Skip to content
Snippets Groups Projects
Commit 8631ffb2 authored by Georgy Kirichenko's avatar Georgy Kirichenko Committed by Konstantin Osipov
Browse files

Altering a space takes effect immediately.

Before this patch, the new space, created by alter specification,
would be put into space cache only after successful WAL write.

This behaviour is not linearizable: on a replica, the WAL is
played sequentially, and the order of events could differ from the
master.

Besides, it could crash, as demonstrated in gh-2074 test case.

Since we use a cascading rollback for all transactions on WAL
write error, it's OK to put a space into space cache
before WAL write, so that the new transactions apply to the new
space.

This patch does exactly that.

All subsequent requests are executed against the new space.

This patch also removes on_replace trigger in the old space, since
all checks against the new tuple format are performed using the new
space.

Fixes #2074.
parent 212cab57
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment