box: deprecate triggers during recovery#11775
Merged
locker merged 1 commit intotarantool:masterfrom Aug 27, 2025
Merged
Conversation
locker
reviewed
Aug 25, 2025
changelogs/unreleased/gh-11756-deprecate-on-recovery-triggers.md
Outdated
Show resolved
Hide resolved
894a2d6 to
f74fba9
Compare
locker
reviewed
Aug 26, 2025
Totktonada
approved these changes
Aug 26, 2025
Contributor
Totktonada
left a comment
There was a problem hiding this comment.
No objections from my side.
AArdeev
approved these changes
Aug 27, 2025
changelogs/unreleased/gh-11756-deprecate-on-recovery-triggers.md
Outdated
Show resolved
Hide resolved
There are a number of arguments to deprecate triggers on recovery: - One has to write triggers with this peculiarity in mind. For example, if a trigger is used for some kind of data exporting, it should be skipped during recovery because the data must have already been exported before restart. - These triggers do not work with other engines. For example, in case of Vinyl, the behavior is undefined: a trigger may or may not run for a statement recovered from an xlog, depending on whether it was dumped to disk before restart. - Using `before_replace` triggers on recovery is dangerous because it may break recovery. Even if it doesn't, one may get a database state, in which the in-memory data is different from on-disk data, which may result in weird breakages later. - Supporting triggers on recovery slows down startup because we have to run all statements recovered from the snapshot through the transaction manager, see tarantool#11452 (Recovery performance regression (-1.5x on SSD)). - Handling the triggers complicates our code. We have to disable certain features if triggers are set, e.g. see tarantool#10847 (Save order of secondary indexes to snapshot). Now if `compat.box_recovery_triggers_deprecation` is 'new' we do not trigger space and transactional events during recovery. Closes tarantool#11756 @TarantoolBot document Title: Deprecate triggers during recovery Deprecate space and transactional triggers during recovery. (Please create https://tarantool.io/compat/box_recovery_triggers_deprecation) We are planning to switch the compat option to the new behavior starting from Tarantool 4.0 with the ability to revert to the old behavior. Starting from Tarantool 5.0 there will be no option to trigger events during recovery.
f74fba9 to
66baf79
Compare
locker
approved these changes
Aug 27, 2025
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.
See the issue for motivation.
Now if
compat.box_recovery_triggers_deprecationis 'new' we do not trigger space and transactional events during recovery.Closes #11756
@TarantoolBot document
Title: Deprecate triggers during recovery
Deprecate space and transactional triggers during recovery.
(Please create https://tarantool.io/compat/box_recovery_triggers_deprecation)
We are planning to switch the compat option to the new behavior starting from Tarantool 4.0 with the ability to revert to the old behavior. Starting from Tarantool 5.0 there will be no option to trigger events during recovery.