-
Notifications
You must be signed in to change notification settings - Fork 379
-
Notifications
You must be signed in to change notification settings - Fork 379
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
memtx: replication JOIN should work off a checkpoint, not a snapshot file #1271
Comments
rolling feature, moving to 1.7.3 |
This issue'll help to avoid creation of initial snapshots. I'll set it as prio1. |
The test uses box.on_schema_init to install space.before_replace trigger that changes the engine/locality of a space received by a replica. This works, only because we don't make a snapshot after creating those spaces on the master so that they are relayed from an xlog. If we added box.snapshot(), the test would fail, because space.before_replace trigger isn't run for changes received on initial join (see #4417). Once we make the initial join stage work off the current read view rather than the last snapshot (see #1271), the test will fail as well. Let's disable the test until the issue is resolved. Needed for #1271 See #4417
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes #1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes tarantool#1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes tarantool#1271
Historically, we join a new replica off the last checkpoint. As a result, we must always keep the last memtx snapshot and all vinyl data files corresponding to it. Actually, there's no need to use the last checkpoint for joining a replica. Instead we can use the current read view as both memtx and vinyl support it. This should speed up the process of joining a new replica, because we don't need to replay all xlogs written after the last checkpoint, only those that are accumulated while we are relaying the current read view. This should also allow us to avoid creating a snapshot file on bootstrap, because the only reason why we need it is allowing joining replicas. Besides, this is a step towards decoupling the vinyl metadata log from checkpointing in particular and from xlogs in general. Closes tarantool#1271
So how does this feature work? Does the newly introduced RO view require additional RAM or CPU to function? |
It uses the same technique as when taking a snapshot - so it does require a little extra ram, yes, but this is the same amount as is usually required to take a snapshot. |
The comment states that relay sends the latest snapshot to replica during initial join, however, this was changed in commit 6332aca (relay: join new replicas off read view). Now relay sends rows from the read view created at the moment of join. Update the comment to match. Follow-up tarantool#1271
Replication JOIN in MemTX engine should create a checkpoint on the fly, and send data from the in-memory state, rather than a disk file. This is a pre-requisite task for #1270 and continuous snapshotting in memtx.
The text was updated successfully, but these errors were encountered: