Skip to content

Re-introduce stream/consumer snapshot on shutdown#6279

Merged
derekcollison merged 1 commit intomainfrom
maurice/snapshot-on-shutdown
Dec 18, 2024
Merged

Re-introduce stream/consumer snapshot on shutdown#6279
derekcollison merged 1 commit intomainfrom
maurice/snapshot-on-shutdown

Conversation

@MauriceVanVeen
Copy link
Copy Markdown
Member

Since the race condition of installing snapshots during shutdown was fixed in #6153, we have not re-introduced this snapshotting but done in the right place. (Meta already has this)

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner December 18, 2024 10:06
Copy link
Copy Markdown
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 87f42d7 into main Dec 18, 2024
@derekcollison derekcollison deleted the maurice/snapshot-on-shutdown branch December 18, 2024 14:08
wallyqs added a commit that referenced this pull request Jan 9, 2025
#### Dependencies
- #6323
- #6324

####  Leafnode
- #6291

#### JetStream
- #6226
- #6235
- #6277
- #6279
- #6283
- #6289
- #6316
- #6317
- #6325
- #6326
- #6335
- #6338
- #6341
- #6344
- #6150
- #6351
- #6355

#### Tests
- #6278
- #6297
- #6300
- #6343
- #6329
- #6330
- #6331
- #6332
- #6334
- #6356
neilalexander added a commit that referenced this pull request Jun 4, 2025
When shutting down the stream would not be snapshotted. Either the
monitor would close first and `doSnapshot` would not be called, or there
would be a race with the Raft node being stopped and `InstallSnapshot`
becoming a no-op.

Relates to #6279

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
neilalexander added a commit that referenced this pull request Oct 30, 2025
…hutting down (#7495)

In #6279 we introduced attempting snapshots on shutdown, but some of
these branches would snapshot regardless of whether we're actually
shutting down or not, i.e. for assets that are either about to go away
(i.e. due to being deleted or scaled down on a given node).

Signed-off-by: Neil Twigg <neil@nats.io>
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