fix(server-ng): close server-ng SDK-visible behavior gaps - #3828
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3828 +/- ##
=============================================
- Coverage 75.62% 57.27% -18.36%
Complexity 1046 1046
=============================================
Files 1337 1335 -2
Lines 169125 150790 -18335
Branches 141481 123223 -18258
=============================================
- Hits 127907 86364 -41543
- Misses 37435 60752 +23317
+ Partials 3783 3674 -109
🚀 New features to boost your workflow:
|
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
reviewed
Aug 6, 2026
numinnex
requested changes
Aug 6, 2026
The Python SDK suite pinned twelve server-ng divergences from the legacy server as strict xfails; this closes the eleven that were server bugs (get_topics on a missing stream erroring is intended). Timestamp polls now filter on the broker append time replies report; a missing partition id denies with PartitionNotFound instead of an empty success; an unmaterialized partition reports its initial one-empty-segment state. Pre-consensus validation shared by TCP and HTTP denies TooManyPartitions (create_topic, create_partitions, delete_partitions) and InvalidTopicSize before a rejected request burns a replicated log entry. Updates store ServerDefault sentinels verbatim and reads echo the stored size and expiry instead of freezing the node default into state. Purge never reached partition data. Purge commits now wake the reconciler; the applied generation is durable per partition (purge.gen, always fsynced last, and an I/O error reading it back fails boot instead of silently re-purging); a purge floor fences every journal-apply path, surviving the poll-index rebuild of eviction re-appends; repair serves only above the floor and defers while a committed purge is not yet locally applied. Repair-vs-purge ordering across a StartView stays open, documented as TODO. # Conflicts: # core/partitions/src/iggy_partition.rs # core/server-ng/src/bootstrap.rs # core/server-ng/src/dispatch.rs # core/server-ng/src/partition_helpers.rs # core/server-ng/src/partition_reconciler.rs # core/server-ng/src/responses.rs # core/shard/src/lib.rs
Several purge paths still resurrected or destroyed data. A replica that had not applied a committed purge accepted repair floors from purged peers and silently dropped every post-purge batch behind its stale durable line; repaired appends bypassed the purge floor invariant; a pre-purge truncation watermark survived the purge and could delete post-purge segments; a purge.gen left behind by a failed teardown made a recreated partition swallow its next purge; and fenced journal entries stayed poll-visible and pinned memory on idle purged partitions. Defer repair replies until the committed purge applies locally, guard repaired-append accounting behind the floor, zero the watermark in both purge applies, key purge.gen to the partition's created_revision so a stale incarnation hydrates as zero, filter fenced entries out of resident polls, and evict the fenced prefix up to commit_min (evicting past the walk would wedge it on a hole). Also reject zero-count partition changes pre-consensus (legacy create_topic admits zero, so only the change paths gate), deny get_consumer_offset typed on a missing partition, pass PartitionNotFound through HTTP polls, resolve the ServerDefault size sentinel against the node default at cleaner enforcement time, and count deferred repair serves.
hubcio
force-pushed
the
fix/server-ng-sdk-behavior-gaps
branch
from
August 7, 2026 10:46
d2b0f11 to
be93463
Compare
The remaining review findings that were deferred by design had no presence in code: the follower-local get_consumer_offset read, the replica-plane version fence behind the router's silent drop of an unknown consensus operation, the materialization signal the stats registry lacks, and the untestable repair-reply purge gate. Each now carries a TODO at the exact site so the gaps cannot be rediscovered from scratch. The purge's two directory fsyncs also swallowed their errors. Both now log: the partition-dir failure is benign (the generation record has not run, a crash re-purges at boot), but a failed offsets-dir fsync followed by the generation write can resurrect deleted offset files with no re-purge left to clear them, so silence there hid a real hazard.
mmodzelewski
approved these changes
Aug 7, 2026
piotr-laserdata
approved these changes
Aug 7, 2026
spetz
approved these changes
Aug 7, 2026
numinnex
approved these changes
Aug 7, 2026
krishvishal
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Python SDK suite pinned twelve server-ng divergences from the
legacy server as strict xfails; this closes the eleven that were
server bugs (get_topics on a missing stream erroring is intended).
Timestamp polls now filter on the broker append time replies
report; a missing partition id denies with PartitionNotFound
instead of an empty success; an unmaterialized partition reports
its initial one-empty-segment state. Pre-consensus validation
shared by TCP and HTTP denies TooManyPartitions (create_topic,
create_partitions, delete_partitions) and InvalidTopicSize before
a rejected request burns a replicated log entry. Updates store
ServerDefault sentinels verbatim and reads echo the stored size
and expiry instead of freezing the node default into state.
Purge never reached partition data. Purge commits now wake the
reconciler; the applied generation is durable per partition
(purge.gen, always fsynced last, and an I/O error reading it back
fails boot instead of silently re-purging); a purge floor fences
every journal-apply path, surviving the poll-index rebuild of
eviction re-appends; repair serves only above the floor and defers
while a committed purge is not yet locally applied. Repair-vs-purge
ordering across a StartView stays open, documented as TODO.