Skip to content

rosmar changes prior to CBG-5041 - #96

Merged
RIT3shSapata merged 7 commits into
mainfrom
CBG-5041-rosmar
Sep 29, 2026
Merged

RIT3shSapata merged 7 commits into
mainfrom
CBG-5041-rosmar

Conversation

@RIT3shSapata

Copy link
Copy Markdown
Contributor
  • change rosmar's DCP behvaior to remove checkpoints on one shot DCP feed
  • add test coverage for the same
  • modify behaviour of other tests

- change rosmar's DCP behvaior to remove checkpoints on one shot DCP feed
- add test coverage for the same
- modify behaviour of other tests
Comment thread feeds.go Outdated
Comment thread feeds.go Outdated
Comment thread feeds.go Outdated
@torcolvin torcolvin assigned RIT3shSapata and unassigned torcolvin Sep 18, 2026
RIT3shSapata and others added 2 commits September 21, 2026 17:43
The checkpoint is shared by the collections in a feed, so StartDCPFeed drops it
once they have all drained to the end, rather than each feed doing so in run().
A terminated feed keeps it so the next run can resume. Guards against a nil
metadata store.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
errors.AsType needs Go 1.26 or later, so the go directive and the CI toolchain
move up together.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
No released golangci-lint targets Go 1.27, so the directive stays at the lowest
version errors.AsType compiles on. The terminated feed tests now step one event
at a time, so the feed yields and the terminator always closes the queue first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@torcolvin torcolvin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these comments were generated with claude's code review tool and I tweaked a few of them.

I didn't provide regression tests for each one, but you should verify with a test and then do a fix. The fixes are just suggestions, you can do them in slightly different ways. It is possible not all of them are real bugs that you could hit.

Comment thread feeds.go Outdated
Comment thread feeds.go Outdated
Comment thread feeds.go Outdated
Comment thread feeds.go
Comment thread queue.go Outdated
Comment thread feeds_test.go Outdated
Comment thread feeds_test.go Outdated
Comment thread feeds_test.go Outdated
Comment thread feeds_test.go
Comment thread feeds.go Outdated
Feeds on different collections can share a checkpoint document. A dump now
saves it once, after all of its collections stop. A resumed dump that streamed
everything removes only its own entries, and deletes the document when none
are left. A dump that did not resume never removes entries.

A feed that stops on a corrupt event now counts as cut short. pull() reports
a closed queue under the same lock, so a stop after the end-of-feed marker no
longer marks a completed feed as terminated. A FeedResume feed with no
MetadataStore fails to start, and other feeds with no store skip the
checkpoint instead of panicking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread feeds.go Outdated
Comment thread feeds_test.go
A feed that names a collection twice now runs one feed on it. Two feeds on
the same collection delivered each document twice, and the second feed's
done channel replaced the first one's.

A feed now checks its Terminator before each event. Before, it stopped only
when a separate goroutine closed the queue. If that goroutine ran late, a
terminated dump reached its end and counted as completed. The
multi-collection test also waits for collection1's backfill to end, because
the feed count alone can be 1 before that feed starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RIT3shSapata
RIT3shSapata merged commit bd5a47c into main Sep 29, 2026
19 checks passed
@RIT3shSapata
RIT3shSapata deleted the CBG-5041-rosmar branch September 29, 2026 09:59
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