Skip to content

fix: wrong error variable in copy log, remove debug fmt.Println calls#2707

Open
fix2015 wants to merge 1 commit into
coze-dev:mainfrom
fix2015:fix/wrong-error-var-and-panic
Open

fix: wrong error variable in copy log, remove debug fmt.Println calls#2707
fix2015 wants to merge 1 commit into
coze-dev:mainfrom
fix2015:fix/wrong-error-var-and-panic

Conversation

@fix2015

@fix2015 fix2015 commented Jul 3, 2026

Copy link
Copy Markdown

Two issues:

  • `datacopy.go` line 273 was logging `err` instead of `cpErr` when a document copy failed. At that point `err` was nil from a previous successful call, so every copy failure logged `err: ` making it impossible to debug copy issues in production.

  • `loop.go` and `batch.go` had `fmt.Println` debug statements left in production code. These bypass the structured logging system (`logs.CtxInfof`), can't be filtered by log level, and leak internal state info to stdout.

- datacopy.go was logging err instead of cpErr when a document copy
  failed — err was nil at that point from a previous successful call,
  so every copy failure logged "err: <nil>" making debugging impossible
- loop.go and batch.go had fmt.Println debug statements left in
  production code that bypass the structured logging system and leak
  internal state to stdout
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants