You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "ButterBright (via GitHub)" <gi...@apache.org> on 2025/09/24 16:17:47 UTC
[PR] Fix syncSnapshot for trace [skywalking-banyandb]
ButterBright opened a new pull request, #788:
URL: https://github.com/apache/skywalking-banyandb/pull/788
<!--
⚠️ Please make sure to read this template first, pull requests that don't accord with this template
maybe closed without notice.
Texts surrounded by `<` and `>` are meant to be replaced by you, e.g. <framework name>, <issue number>.
Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]`
-->
<!-- ==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👇 ====
### Fix <bug description or the bug issue number or bug issue link>
- [ ] Add a unit test to verify that the fix works.
- [ ] Explain briefly why the bug exists and how to fix it.
==== 🐛 Remove this line WHEN AND ONLY WHEN you're fixing a bug, follow the checklist 👆 ==== -->
<!-- ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👇 ====
### <Feature description>
- [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
- [ ] Update the documentation to include this new feature.
- [ ] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix syncSnapshot for trace [skywalking-banyandb]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #788:
URL: https://github.com/apache/skywalking-banyandb/pull/788#discussion_r2376351992
##########
banyand/trace/syncer.go:
##########
@@ -189,24 +189,10 @@ func (tst *tsTable) syncSnapshot(curSnapshot *snapshot, syncCh chan *syncIntrodu
if err != nil {
return err
}
- if len(partsToSync) == 0 && len(sidxPartsToSync) == 0 {
- return nil
- }
- hasSidxParts := false
- for _, sidxParts := range sidxPartsToSync {
- if len(sidxParts) == 0 {
- continue
- }
- hasSidxParts = true
- break
- }
- if len(partsToSync) == 0 && !hasSidxParts {
- return nil
- }
// Validate sync preconditions
- if err := tst.validateSyncPreconditions(partsToSync, sidxPartsToSync); err != nil {
- return err
+ if !tst.needToSync(partsToSync, sidxPartsToSync) {
+ return nil
Review Comment:
The refactored logic removes the error message 'no nodes to sync parts' that was previously returned when no nodes were available. This makes debugging harder when sync fails due to missing nodes. Consider adding logging or returning a descriptive error when needToSync returns false due to no available nodes.
```suggestion
return fmt.Errorf("no nodes to sync parts")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix syncSnapshot for trace [skywalking-banyandb]
Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on code in PR #788:
URL: https://github.com/apache/skywalking-banyandb/pull/788#discussion_r2386441266
##########
banyand/trace/syncer.go:
##########
@@ -189,24 +189,16 @@ func (tst *tsTable) syncSnapshot(curSnapshot *snapshot, syncCh chan *syncIntrodu
if err != nil {
return err
}
- if len(partsToSync) == 0 && len(sidxPartsToSync) == 0 {
- return nil
- }
- hasSidxParts := false
- for _, sidxParts := range sidxPartsToSync {
- if len(sidxParts) == 0 {
- continue
- }
- hasSidxParts = true
- break
- }
- if len(partsToSync) == 0 && !hasSidxParts {
- return nil
+ for name, sidxParts := range sidxPartsToSync {
+ tst.l.Debug().
Review Comment:
Wrap with "if l:=tst.l.Debug();l.Enabled(){}"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix syncSnapshot for trace [skywalking-banyandb]
Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily merged PR #788:
URL: https://github.com/apache/skywalking-banyandb/pull/788
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix syncSnapshot for trace [skywalking-banyandb]
Posted by "hanahmily (via GitHub)" <gi...@apache.org>.
hanahmily commented on PR #788:
URL: https://github.com/apache/skywalking-banyandb/pull/788#issuecomment-3337590871
@ButterBright Please change all the debug log levels to "debug." Then, enable them by setting the "--logging-modules" and "--logging-levels" options to activate logging in the liaison and data nodes. Once these changes are made, we can merge this PR to verify the issue under different scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org