-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMPROVEMENT] General stability and bug fixes. #3999
Commits on Mar 29, 2023
-
Bug fixes and general stability improvements.
1. Fixed a bug that would process a removal of a message after the message block was closed. 2. Improved removal of non-existant message when we know the store is empty. 3. Improved last write index size tracking when opening the file descriptor after being closed. 4. Improved Compact() by not loading messages for last block twice. 5. Improved Compact() determination of calling purge by determing last sequence under write lock. 6. Improved Compact() by only compacting underlying message block if over certain size threshold. 7. Improved Compact() by writing the index file if needed while still holding lock avoiding an unecessary re-lock. 8. Improved Compact() by not calling out to upper layers on no messages being purged. 9. Fixed a bug in Compact() that would not delete members from a block's delete map. 10. Fixed a bug in reset() when a callback was not registered (raft logs) which avoiding msg block cleanup. 11. Improved consumer store Update() call for when to avoid an outdated update. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 6d43041 - Browse repository at this point
Copy the full SHA 6d43041View commit details -
Bug fixes and general stability improvements.
1. If reset ignore Applied() that are greater then our commit. 2. Improved StepDown() by placing at back of queue if preferred. 3. Improved handling of leadership transfer during StepDown(). 4. Do not store EntryLeaderTransfer records on disk. 5. Remove un-needed processing of older terms. 6. If append entry has higher term, also inherit pterm. 7. Only inherit a candidate's term if we decide to vote for them. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 182bf6c - Browse repository at this point
Copy the full SHA 182bf6cView commit details -
Improvements to consumers attached to an interest retention stream.
1. Do not process an ack if we are closed. 2. When checking for needing an ack for a given consumer, hold lock entire time. 3. During recovery and restarts we check if we need to replay acks to the parent stream. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for e516c47 - Browse repository at this point
Copy the full SHA e516c47View commit details -
General improvements around handling interest retention.
1. During ackMsg processing hold write lock to block concurrent access. 2. Check for presence of preAcks before and force removal if present. 3. Rework check for orphan msgs on startup to use checkStateForInterestStream(). Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 5cabc36 - Browse repository at this point
Copy the full SHA 5cabc36View commit details -
General improvements to interest based stream processing when acks ar…
…rive before the actual msgs. 1. If we are retention based, make sure our consumers are running before entering into monitorStream logic. 2. If we skip messages and are interest based, make sure we check for a preAck state. 3. On finalization of recovery for consumers have them check against the interest based stream. 4. Do not process ack state updates if consumer is closed and shutting down. 5. When processing final state for a stream after upper layer catchup, check all attached consumers for ack skew. 6. During catchup of stream messages consult preAck state and skip messages as needed. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 71af150 - Browse repository at this point
Copy the full SHA 71af150View commit details -
Additional tests to stress interest based streams with pull subscribe…
…rs during rolling restarts. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 0d9f707 - Browse repository at this point
Copy the full SHA 0d9f707View commit details -
Since we no longer store leaderTransfers, which is proper, some tests…
… were getting and advantage on that after server restart. This change speeds up raft layer more to avoid timeouts. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 52fbac6 - Browse repository at this point
Copy the full SHA 52fbac6View commit details -
Tweak tests due to changes, make test timeouts uniform.
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for e97ddcd - Browse repository at this point
Copy the full SHA e97ddcdView commit details -
Make sure consumer is valid and state was returned
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for c4da37e - Browse repository at this point
Copy the full SHA c4da37eView commit details -
Snapshots of no length can hold state as well
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 35d1a77 - Browse repository at this point
Copy the full SHA 35d1a77View commit details -
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for a9a4df8 - Browse repository at this point
Copy the full SHA a9a4df8View commit details -
Additional protection for bad state when rebuilding a message block
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for ddfa5cd - Browse repository at this point
Copy the full SHA ddfa5cdView commit details -
Always make sure cluster and meta raft node available when needed
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 6c3e64b - Browse repository at this point
Copy the full SHA 6c3e64bView commit details -
On bad or corrupt message load during commit, reset WAL vs mark write…
… error Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for e274693 - Browse repository at this point
Copy the full SHA e274693View commit details -
Double check here if the jetstream cluster was shutdown when we relea…
…sed the lock Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 2b89fea - Browse repository at this point
Copy the full SHA 2b89feaView commit details -
Update server/jetstream_cluster.go
Pre-allocate Co-authored-by: Neil <neil@nats.io>
Configuration menu - View commit details
-
Copy full SHA for c77872b - Browse repository at this point
Copy the full SHA c77872bView commit details -
Pre-allocate Co-authored-by: Neil <neil@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 152b25c - Browse repository at this point
Copy the full SHA 152b25cView commit details -
Update based on review feedback
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for 9a714e7 - Browse repository at this point
Copy the full SHA 9a714e7View commit details -
Snapshot meta for this function to use in case it gets removed out fr…
…om underneath of us. Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for ade0e9d - Browse repository at this point
Copy the full SHA ade0e9dView commit details -
Moved log running test to NoRace suite
Signed-off-by: Derek Collison <derek@nats.io>
Configuration menu - View commit details
-
Copy full SHA for c546828 - Browse repository at this point
Copy the full SHA c546828View commit details