Skip to content

split store, state machine - #9

Merged
bootjp merged 5 commits into
mainfrom
devlop
Dec 3, 2023
Merged

split store, state machine#9
bootjp merged 5 commits into
mainfrom
devlop

Conversation

@bootjp

Copy link
Copy Markdown
Owner

No description provided.

Comment threadkv/fsm.go Outdated
slog.String("value", string(req.Value)),
slog.Uint64("hash", key),
)
//switch {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci]reported by reviewdog 🐶
commentFormatting: put a space between // and comment text (gocritic)

Comment threadkv/fsm.go Outdated
//switch {
//case r pb.PutRequest:
f.log.InfoContext(ctx, "applied raft log", slog.String("type", "PutRequest"))
return f.store.Put(ctx, req.Key, req.Value)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [golangci]reported by reviewdog 🐶
error returned from interface method should be wrapped: sig: func (github.com/bootjp/elastickv/kv.Store).Put(ctx context.Context, key []byte, value []byte) error (wrapcheck)

@bootjp
bootjp enabled auto-merge December 3, 2023 14:31
@bootjp
bootjp disabled auto-merge December 3, 2023 15:51
@bootjp
bootjp merged commit 9632c56 into mainDec 3, 2023
@bootjp
bootjp deleted the devlop branch December 3, 2023 15:51
bootjp added a commit that referenced this pull request May 26, 2026
Addresses the non-blocking review findings on the Stage 7a-2
implementation (no P0/P1/major were raised):
- retryUntilRegistered (#1, #2): re-warn periodically (every
registrationGateWarnAfter) instead of once, so a node stuck for
minutes stays visible; log the ctx-cancellation (clean-shutdown)
branch at INFO so a graceful restart during the bootstrap retry window
reads as shutdown rather than failure. The returned error still
preserves the context.Canceled chain (consistent with every other
ctx-aware startup step).
- verifyRegistered (#3): build the WriterRegistryFor handle once in
buildProcessStartRegistrationGate and reuse it across the retry loop
via the new registryLastSeen helper, instead of re-asserting +
allocating a handle per call.
- setupDistributionCatalog (#9): document the EnsureCatalogSnapshot
idempotency requirement the retry relies on (populated-catalog path is
a version-unchanged no-op Save).
- Tests (#5): TestRetryUntilRegistered drives the helper through
converge-after-transient-gate-error, immediate-non-gate-error,
immediate-success, and ctx-cancellation paths.
claude #4 (newCutoverApplier unused dir param) is a pre-existing test
helper untouched by this slice; left out of scope.
Sign up for freeto 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.

1 participant

@bootjp