GeezerVison is showing github.com — feat(#9498): operator override to lift the stale-snapshot read floor on a sole voter by robfrank · Pull Request #9593 · ArcadeData/arcadedb
Conversation
robfrank
commented
Oct 9, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Closes #9498
Summary
A sole voter whose Ratis snapshot marker runs ahead of the entries it applied holds the node-wide stale-snapshot read floor of #6111: /api/v1/ready stays 503 and LINEARIZABLE reads are clamped. Only a full resync from a peer lifts it, and a leader refuses to resync from itself, so on a one-voter cluster the wedge was terminal with no operator action short of rebuilding the node. This PR adds the node-wide counterpart of the #9449 override: POST /api/v1/cluster/accept-stale-snapshot (root only) and the gRPC AcceptStaleSnapshot RPC, both through HAServerPlugin.acceptStaleSnapshot. It is allowed only on a sole voter. It accepts the gap, persists max(marker index, global applied) as the applied position (global, plus every present database that has no quarantine or per-database floor of its own), so the next reinitialize() does not raise the floor again. It also drops the queued download, clears the floor, wakes the apply waiters, and logs a WARNING audit line with who did it, the floor and the marker index. The write is not best-effort: if it fails, the in-memory positions are put back and the floor stays. The override is refused with a peer (409 / FAILED_PRECONDITION), while a snapshot download is running (409), and when no floor stands (404 / NOT_FOUND).
Coverage
| Entry point |
Status |
HTTP POST /api/v1/cluster/accept-stale-snapshot (PostAcceptStaleSnapshotHandler, worker thread) |
fixed here - Issue9498AcceptStaleSnapshotIT |
gRPC AcceptStaleSnapshot (ArcadeDbGrpcAdminService) |
fixed here - Issue9498GrpcAcceptStaleSnapshotIT, ...WithoutHaIT |
RemoteServer.acceptStaleSnapshot() |
fixed here - Issue9498AcceptStaleSnapshotIT |
RemoteGrpcServer.acceptStaleSnapshot() |
fixed here - Issue9498RemoteGrpcAcceptStaleSnapshotIT |
OpenAPI (PluginApiSpec, HA_RAFT_PATHS) |
fixed here - PluginApiSpecTest, OpenApiSpecGenerationIT, RaftHAPluginRegisteredRoutesMatchApiSpecTest |
Core (ArcadeStateMachine.acceptStaleSnapshotFloor, RaftHAPlugin.acceptStaleSnapshot) |
fixed here - Issue9498AcceptStaleSnapshotFloorTest (10 tests) |
Operator guidance (local-resync-in-progress alert, sole-voter no-peer SEVERE line, ha-raft/CLAUDE.md) |
fixed here |
Floor publisher: reinitialize() is the only writer that raises it |
argued: the persisted position now covers the marker, so the gap check is false (test re-runs reinitialize()) |
| Multi-voter cluster where every voter shares the gap |
argued, out of scope: the snapshot server does not refuse on the node-wide floor (only quarantined databases, #8468), so a follower resyncs from the leader and the #8529 hand-off moves leadership. It converges, so it is not terminal the way a sole voter is |
Known gaps: None filed. Same audit residue as #9449: the gRPC audit line names the user, not the caller address.
Test plan
-
Issue9498AcceptStaleSnapshotFloorTest (10 tests; real state machine, real Ratis storage + snapshot marker, real applied-index file): lift + survives reinitialize() + persisted for a fresh state machine; refused with a peer; 404 with nothing standing; refused while a download runs; failed write lifts nothing and puts back exactly the per-database positions it moved; quarantined DB keeps its quarantine and position; never regresses an apply position past the marker; default HA plugin refuses; sole-voter report names the route
- Mutation check: dropping
needsSnapshotDownload.set(false) / the global position write makes the core test fail
-
Issue9498AcceptStaleSnapshotIT (one-voter cluster: ready 503 -> 200, 404 after; RemoteServer client)
-
Issue9498GrpcAcceptStaleSnapshotIT, Issue9498GrpcAcceptStaleSnapshotWithoutHaIT, Issue9498RemoteGrpcAcceptStaleSnapshotIT
- Regression:
Issue9449* (unit + 3 ITs + client IT), Issue6111StaleSnapshotReadFloorTest, Issue8529LeaderServiceGapHandOffTest, Issue9308SoleVoterApplyErrorTest, Issue7621BlockingHandlersWorkerThreadTest, PluginApiSpecTest, ApiSpecPathConstantsTest, OpenApiSpecGenerationIT
Adversarial pass
Not run as an independent subagent: this run had no subagent tool. I did a self-review in its place. It found nothing that needed a change: lock order is snapshotDownloadLock (tryLock only) then appliedIndexFileLock, so it cannot deadlock, and no other path raises the floor besides reinitialize().
Release note
New root-only operator route POST /api/v1/cluster/accept-stale-snapshot (gRPC AcceptStaleSnapshot) for a sole voter stuck behind the stale-snapshot read floor. Add it to the 26.11.1 docs checklist (arcadedb-docs#477) next to accept-diverged.
Review cycles
- cycle 1:
65d366a7f6. claude-review found no blocking issues. Applied: a package-private test hook (ArcadeStateMachine.publishStaleSnapshotFloor) in place of reflection in BaseRaftHATest (BaseRaftHATest is in the same package as the state machine, so no public hook is needed), and clearer wording in the sole-voter report. Pushed as af436317bd.
- cycle 2:
af436317bd. Applied: the rollback now runs in a finally on any failure, including a RuntimeException, and restores only the per-database entries the override moved, so lock-free readers never see a cleared map. The download-running message now also covers an install holding the lock. Added a test for the rollback of a database with no prior position. Pushed as 417653143a.
- cycle 3:
417653143a. claude-review: "Well tested and conservative... it refuses by default and fails closed". Nothing actionable (see below). Clean.
Deferred / skipped review items
- "Sole-voter check is not atomic with the lift" (cycles 1-3): skipped. The plugin Javadoc documents it, with the same trade-off as A quarantine that already stands on a sole voter (restored from disk, or raised before the cluster shrank) still can never lift: add an operator override #9449. A membership change cannot be held off from inside the state machine's file lock, and a peer that joins installs its copy from this node.
- "Expose the human-readable
result text in the gRPC response" (cycle 1): skipped, to keep parity with AcceptDivergedDatabaseResponse, which carries none either.
- "gRPC audit line has no caller address" (cycles 1, 3): skipped. This is the same residue as A quarantine that already stands on a sole voter (restored from disk, or raised before the cluster shrank) still can never lift: add an operator override #9449, already tracked from that PR, and it should be fixed for both RPCs together.
- "Databases not listed at lift time keep their old position; the next reinitialize() could raise a per-database floor" (cycle 3): not real.
reinitialize() compares only the GLOBAL persisted position against the marker. The per-database floor is published only by an install that gave up (HA: a snapshot install that gives up on a database still ACKs the snapshot index, clearing the read floor and enabling stale linearizable reads #6760), never by a restart. A lower per-database position only stops the bootstrap replay-skip from skipping that database's entries, which is the conservative direction. The resync path (writePersistedAppliedIndexForAllDatabases) uses the same server.getDatabaseNames() set.
- "Use a dedicated exception instead of IllegalStateException" (cycle 3): skipped. The only
IllegalStateException that acceptStaleSnapshotFloor throws is the download/install refusal.
- "WithoutHaIT sets SERVER_PLUGINS globally" (cycle 3): not real.
BaseGraphServerTest teardown runs GlobalConfiguration.resetAll().
- "Run an independent adversarial review" (cycle 3): not done in this run, for lack of a subagent tool. Left for the maintainer.
Final state
clean-approval. Merge is the developer's.
🤖 Generated with Claude Code
Summary by CodeRabbit
- New Features
- Added an operator recovery option to accept a stale-snapshot gap on a single-voter cluster, lifting the node-wide read floor without resynchronizing.
- The operation is available through HTTP, gRPC, and remote client APIs, and reports the accepted snapshot and applied positions.
- Documentation
- Added guidance on the recovery option and its restrictions, including cases where it is unavailable.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…on a sole voter
POST /api/v1/cluster/accept-stale-snapshot (root only) and its gRPC twin
AcceptStaleSnapshot lift the node-wide stale-snapshot read floor (#6111) on a
node that is the sole voter of its cluster, where no peer can ever serve the
resync that is otherwise the only way out. The marker index is persisted as the
applied position so the next reinitialize() does not raise the floor again, and
the override is logged at WARNING with who made it. Refused with a peer, while
a download is running, and when no floor stands. RemoteServer and
RemoteGrpcServer clients, OpenAPI, alerts and ha-raft/CLAUDE.md updated.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
coderabbitai
Bot
commented
Oct 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
82e0513a-8aee-4d75-86ce-70a59b0b5bae
📥 Commits
Reviewing files that changed from the base of the PR and between 4141f12 and 4176531.
📒 Files selected for processing (21)
grpc-client/src/main/java/com/arcadedb/remote/grpc/RemoteGrpcServer.java
grpc-client/src/test/java/com/arcadedb/remote/grpc/Issue9498RemoteGrpcAcceptStaleSnapshotIT.java
grpc/src/main/proto/arcadedb-server.proto
grpcw/src/main/java/com/arcadedb/server/grpc/ArcadeDbGrpcAdminService.java
grpcw/src/test/java/com/arcadedb/server/grpc/Issue9498GrpcAcceptStaleSnapshotIT.java
grpcw/src/test/java/com/arcadedb/server/grpc/Issue9498GrpcAcceptStaleSnapshotWithoutHaIT.java
ha-raft/CLAUDE.md
ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.java
ha-raft/src/main/java/com/arcadedb/server/ha/raft/ClusterAlerts.java
ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostAcceptStaleSnapshotHandler.java
ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.java
ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAServer.java
ha-raft/src/test/java/com/arcadedb/server/ha/raft/BaseRaftHATest.java
ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue7621BlockingHandlersWorkerThreadTest.java
ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue9498AcceptStaleSnapshotFloorTest.java
ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue9498AcceptStaleSnapshotIT.java
network/src/main/java/com/arcadedb/remote/RemoteServer.java
server/src/main/java/com/arcadedb/server/HAServerPlugin.java
server/src/main/java/com/arcadedb/server/http/handler/openapi/PluginApiSpec.java
server/src/test/java/com/arcadedb/server/http/OpenApiSpecGenerationIT.java
server/src/test/java/com/arcadedb/server/http/handler/openapi/PluginApiSpecTest.java
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
📝 Walkthrough
Walkthrough
Adds a root-authorized operation to accept a node-wide stale-snapshot floor on a sole-voter Raft node. The operation persists acceptance state and is available through HTTP and gRPC, with remote client methods and integration tests.
Changes
Stale-snapshot floor acceptance
| Layer / File(s) |
Summary |
Accept and persist the stale-snapshot floor ha-raft/src/main/java/com/arcadedb/server/ha/raft/ArcadeStateMachine.java, ha-raft/src/test/java/com/arcadedb/server/ha/raft/BaseRaftHATest.java, ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue9498AcceptStaleSnapshotFloorTest.java |
The state machine accepts the floor, persists the accepted position, and updates eligible database positions. Tests cover refusal conditions, persistence rollback, and preservation of per-database quarantine and read floors. |
Expose acceptance through the HA plugin and HTTP server/src/main/java/com/arcadedb/server/HAServerPlugin.java, ha-raft/src/main/java/com/arcadedb/server/ha/raft/RaftHAPlugin.java, ha-raft/src/main/java/com/arcadedb/server/ha/raft/PostAcceptStaleSnapshotHandler.java, ha-raft/src/main/java/com/arcadedb/server/ha/raft/{ClusterAlerts,RaftHAServer}.java, ha-raft/CLAUDE.md, ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue7621BlockingHandlersWorkerThreadTest.java |
The HA plugin registers floor acceptance and the HTTP handler enforces root access and maps errors to HTTP responses. HA reports and guidance describe the route and its restrictions. |
Add HTTP client support and API specification network/src/main/java/com/arcadedb/remote/RemoteServer.java, server/src/main/java/com/arcadedb/server/http/handler/openapi/PluginApiSpec.java, server/src/test/java/com/arcadedb/server/http/{OpenApiSpecGenerationIT.java,handler/openapi/PluginApiSpecTest.java}, ha-raft/src/test/java/com/arcadedb/server/ha/raft/Issue9498AcceptStaleSnapshotIT.java |
The remote client posts to the acceptance route. The OpenAPI specification documents the operation and response fields. Tests cover HTTP and client behavior and validate the API specification. |
Add gRPC service and client support grpc/src/main/proto/arcadedb-server.proto, grpcw/src/main/java/com/arcadedb/server/grpc/ArcadeDbGrpcAdminService.java, grpc-client/src/main/java/com/arcadedb/remote/grpc/RemoteGrpcServer.java, grpcw/src/test/java/com/arcadedb/server/grpc/Issue9498GrpcAcceptStaleSnapshot*IT.java, grpc-client/src/test/java/com/arcadedb/remote/grpc/Issue9498RemoteGrpcAcceptStaleSnapshotIT.java |
The gRPC protocol, admin service, and remote client add the acceptance operation. Tests cover successful acceptance, authentication, missing HA, and non-root access. |
Priority: ⬆️ High
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant Operator
participant PostAcceptStaleSnapshotHandler
participant RaftHAPlugin
participant ArcadeStateMachine
Operator->>PostAcceptStaleSnapshotHandler: POST accept-stale-snapshot
PostAcceptStaleSnapshotHandler->>RaftHAPlugin: acceptStaleSnapshot with caller identity
RaftHAPlugin->>ArcadeStateMachine: acceptStaleSnapshotFloor
ArcadeStateMachine-->>RaftHAPlugin: acceptance details
RaftHAPlugin-->>PostAcceptStaleSnapshotHandler: acceptance result
PostAcceptStaleSnapshotHandler-->>Operator: HTTP response
Loading
Suggested reviewers: lvca
Merge Risk: ⚪ Minimal · up to 41765
No actionable merge-blocking issue was established for the stale-snapshot recovery operation. It is mergeable after normal checks.
🚥 Pre-merge checks | ✅ 4 | ❓ 1
❌ Failed checks (1 inconclusive)
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 33.68% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 95 functions across 18 files. (3 skipped:… |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
#9498 requires an operator recovery action for the node-wide stale-snapshot floor on a sole voter. The PR adds the root-only HTTP route and the AcceptStaleSnapshot gRPC RPC. It adds OpenAPI, proto, … |
| Out of Scope Changes check |
 |
The changed files support #9498. They implement the recovery flow, expose the required HTTP and gRPC interfaces, update OpenAPI and client APIs, add operator guidance, and add focused regression and i… |
| Title check |
 |
The title clearly and concisely identifies the main change: an operator override that lifts the stale-snapshot read floor for a sole voter. |
| Description check |
 |
The description is comprehensive and covers the change, motivation, related issue, implementation details, failure cases, test coverage, review notes, and release impact. It does not use the template … |
Full details: Docstring Coverage
Explanation
Docstring coverage is 33.68% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 95 functions across 18 files. (3 skipped: 2 unsupported, 1 too large.)
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mergify
Bot
commented
Oct 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Up to standards ✅
🟢 Issues 0 issues
Results:
0 new issues
View in Codacy
🟢 Metrics 19 complexity
| Metric |
Results |
| Complexity |
19 |
View in Codacy
🟢 Coverage 78.57% diff coverage · -5.63% coverage variation
| Metric |
Results |
| Coverage variation |
✅ -5.63% coverage variation |
| Diff coverage |
✅ 78.57% diff coverage |
View coverage diff in Codacy
Coverage variation details
|
Coverable lines |
Covered lines |
Coverage |
| Common ancestor commit (4141f12) |
222297 |
190288 |
85.60% |
| Head commit (4176531) |
255026 (+32729) |
203936 (+13648) |
79.97% (-5.63%) |
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
|
Coverable lines |
Covered lines |
Diff coverage |
| Pull request (#9593) |
112 |
88 |
78.57% |
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Review
Overall this is a solid, carefully scoped change. It mirrors the #9449 override, keeps the same safety rails (root only, sole voter only, refused during a download, 404 when no floor stands) and persists before lifting. The PR describes the lock order as snapshotDownloadLock (tryLock only), then appliedIndexFileLock. I read the diff and agree it cannot deadlock. I did not build the PR or run any of its tests.
What looks good
- The write is not best-effort.
previousGlobal and previousByDb are restored if persistAppliedIndexFile() fails, and the floor stays in that case.
- The applied position never regresses:
Math.max(snapshotIndex, globalAppliedIndex), merge(..., Math::max) and accumulateAndGet.
- Databases that are quarantined or have their own floor are left alone.
- Test coverage is broad: a core test with a real state machine, ITs for HTTP, gRPC,
RemoteServer and RemoteGrpcServer, OpenAPI tests, and the mutation check described in the PR.
- The audit WARNING line names who did it, the floor and the marker index.
Suggestions (non-blocking)
- Sole-voter check is not atomic with the lift.
s.isSoleVoter() is read before acceptStaleSnapshotFloor. If a peer joins in that window, the gap is accepted on a node that now has a peer. The Javadoc acknowledges this, citing A quarantine that already stands on a sole voter (restored from disk, or raised before the cluster shrank) still can never lift: add an operator override #9449. The window is tiny and the operation is operator-driven, so it is acceptable. You could re-check the voter count inside the lock to close it fully.
- Audit residue. The gRPC audit line has the user but no caller address, unlike the HTTP path. The PR notes this too. Capturing the peer address from the gRPC
Context or ServerCall attributes would make the two paths consistent.
- Reflection in
BaseRaftHATest.raiseStaleSnapshotFloor. It reaches into a private field, so a rename of staleSnapshotAppliedFloor fails at runtime instead of at compile time. A package-private @VisibleForTesting-style setter on ArcadeStateMachine would be sturdier. The test is in a different package, so you would need a small public test hook, or you could subclass in the test.
- Response shape. In
ArcadeDbGrpcAdminService, result.getString("localServer", "") and getLong(..., -1L) are fine. Consider also exposing the human-readable result text in the proto response, so gRPC clients see the "check the databases" warning that HTTP clients get.
- Wording. The
ClusterAlerts and noHandoffPeerReport strings read a bit awkwardly: "and a node-wide read floor with POST ...". Consider "and lift a node-wide read floor with POST ...".
Security
Root-only on both transports. The route takes no user-controlled input beyond credentials, and there are no new dependencies. The override is hard to reach by accident and is clearly audited.
CLAUDE.md conformance
- Final params, imports and the
assertThat style all look consistent.
- The new
@Tag and timing rules look fine. I did not see any wall-clock assertions in the diff.
- The test port rules appear to be respected, because the tests use the fixture bases.
No blocking issues found. Nice work.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…he stale floor, clearer sole-voter report wording (#9498)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Review of #9593 (accept-stale-snapshot override)
I read the state machine change, the alert text and the start of the new handler. I did not read the HAServerPlugin, gRPC or test diffs in full.
Good
Points to check
-
Sole-voter check can race. acceptStaleSnapshotFloor does not check the sole-voter condition itself. HAServerPlugin.acceptStaleSnapshot does. If a peer is added between that check and the accept, the floor is lifted on a multi-voter cluster, where a resync is possible. Re-checking inside the lock, or documenting the window, would close it.
-
Rollback on an unexpected exception. The rollback only runs when persistAppliedIndexFile() returns false. If it, or server.getDatabaseNames(), throws a RuntimeException after globalAppliedIndex is mutated, the in-memory state stays modified while the floor remains. A try/catch or finally that restores the previous values would be safer.
-
Rollback is not atomic for readers. appliedIndexByDb.clear() followed by putAll leaves a window where concurrent readers see an empty map. They would only see it if the map is not guarded by appliedIndexFileLock everywhere. Restoring only the keys that were changed avoids this, and is cheaper than copying the whole map.
-
Lock ordering. The order is snapshotDownloadLock, then appliedIndexFileLock. Please confirm that no other path takes them in the opposite order, for example the download completion path.
-
Misleading error. If tryLock() fails, the user gets "a snapshot download is running". The lock may be held for another reason, so the message could be slightly inaccurate.
-
publishStaleSnapshotFloor. It is test-only but package-visible, so it is an unguarded way to raise the floor. That is acceptable since it is package-private. The // @VisibleForTesting comment style should match whatever the rest of the file uses.
-
Tests. Please add or confirm cases for these:
- a persist failure restores the state,
- a concurrent download returns 409,
- a database with a quarantine keeps its per-database position.
The ...IT names suggest the integration cases exist, but a unit test of acceptStaleSnapshotFloor would be faster feedback.
Security
- The route is root-only and audited. Lifting the floor without a resync can silently leave a database missing data. The WARNING text is clear about that, and the docs should say it too.
Overall this is a solid, carefully reasoned change. Points 1 and 2 are the ones I would fix before merge.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Review: sole-voter override to lift the stale-snapshot read floor (#9498)
I read the diff but did not build or run the tests. The design is sound and mirrors the #9449 accept-diverged override.
What looks good
- Lock order is safe: snapshotDownloadLock is only tryLocked, then appliedIndexFileLock, so I see no deadlock.
- A failed write rolls back only the entries it changed, leaves the floor in place, and returns an error (500).
- The position never regresses (max(snapshotIndex, globalAppliedIndex), accumulateAndGet).
- Root only on HTTP and gRPC, refused with a peer, 404 when no floor stands, audit WARNING with user and source address.
- The handler runs on a worker thread and is registered in the 7621 dispatch test.
- Coverage is broad: unit, HTTP IT, gRPC IT with and without HA, remote client, OpenAPI.
Points to consider
- Sole-voter check is not atomic with the lift. isSoleVoter() is read before the lift. Same trade-off as 9449 and documented, so acceptable. A short comment at the call site would help.
- Databases not listed at lift time. Only server.getDatabaseNames() at lift time gets its position set to the accepted index. A database on disk but not listed (closed or not yet loaded) keeps its old position, and the next reinitialize() could raise a per-database floor for it. Please confirm getDatabaseNames() covers those, or add a test.
- Test hook in production code. publishStaleSnapshotFloor is a package-private setter documented as test-only, but nothing enforces that.
- The gRPC audit line names the user but not the caller address (already noted in the PR as residue).
- Error mapping. Any IllegalStateException from acceptStaleSnapshotFloor becomes a 409 'Nothing was lifted', not only the download-running case. A dedicated exception type would be more precise.
- Tests. Issue9498GrpcAcceptStaleSnapshotWithoutHaIT sets global SERVER_PLUGINS. Check it is reset in teardown, as the client IT does. The adversarial pass was only a self-review. For a deliberately lossy operator action, an independent look at the persistence and rollback path is worth doing.
- Docs. Make sure arcadedb-docs 477 is updated, as the release note says.
Verdict: Well tested and conservative: it refuses by default and fails closed. Only point 2 might hide a real functional gap, so I would check that before merging. The rest are minor.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
❌ Patch coverage is 70.53571% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.36%. Comparing base (4141f12) to head (4176531).
Additional details and impacted files
@@ Coverage Diff @@
## main #9593 +/- ##
============================================
- Coverage 77.38% 77.36% -0.02%
- Complexity 4275 4291 +16
============================================
Files 2160 2161 +1
Lines 222297 222409 +112
Branches 47628 47648 +20
============================================
+ Hits 172014 172060 +46
- Misses 32048 32096 +48
- Partials 18235 18253 +18
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|