-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
0377112
to
c9e73a2
Compare
Note: for a cheap copy, we could use XFS' (and some other fs') capabilities of copy-on-write, based on https://man7.org/linux/man-pages/man2/ioctl_ficlone.2.html . Probably not trivial with our current design where a restore also takes place, it's just an interesting concept - e.g. perhaps we could CoW-copy the wallog. |
@psarna we will iterate on that design for sure |
c45fa3d
to
d6b58c6
Compare
Is anything blocking this PR? @psarna @MarinPostma ? |
@haaawk nope, just waiting for review |
d6b58c6
to
9414b5a
Compare
@@ -967,7 +967,7 @@ impl Replicator { | |||
&mut self, | |||
generation: Uuid, | |||
utc_time: Option<NaiveDateTime>, | |||
) -> Result<RestoreAction> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this bool mean? Please add a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now I went over the whole change and I'm even more confused - why was this parameter added at all? It looks like it's not used anywhere, you just ignore it above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces a basic forking functionality. The admin API route
POST /v1/namespaces/:from/fork/:to
forks the namespace:from
into a new namespace:to
from the current point in time.Forking works by creating a copy of the source database. This copy is performed from the replication log, to ensure point-in-time consistency. The forking algorithm works as follows: