Skip to content
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

[NEW] Atomic slot migration HLD #23

Open
PingXie opened this issue Mar 25, 2024 · 5 comments
Open

[NEW] Atomic slot migration HLD #23

PingXie opened this issue Mar 25, 2024 · 5 comments
Assignees
Labels
cluster enhancement New feature or request

Comments

@PingXie
Copy link
Member

PingXie commented Mar 25, 2024

Yet another gem that we should seriously consider for our new project. The original proposal (and the thread) is too long so I am going to leave it at redis/redis#10933.

Note that this feature will be orthogonal to how cluster topology management is done.

@PingXie
Copy link
Member Author

PingXie commented Mar 25, 2024

@madolson and I discussed another option (in the context of atomic slot migration) which essentially implements slot-level replication. Here is the high level flow

  1. source (parent) forks a child with a set of slots to migrate
  2. child streams slots to be migrated in the RDB format (same as replication)
  3. target needs to support no-blocking load of the RDB stream (think of co-routines)
  4. source (parent) starts capturing updates in the migrating slots right after forks
  5. child completes streaming
  6. source (parent) pauses clients writing to these slots
  7. source replicates captured updates to target
  8. source starts the slot ownership transfer process (depending on cluster v1 vs v2, we could take different paths)
  9. source unblocks paused clients with -MOVED <target>

any failure on the target before completing step 8 would abort the migrating process on the source.

@zuiderkwast
Copy link
Contributor

I have an implementation. Didn't write it down yet, but I recorded a song which explains it all. Please review. https://suno.com/song/b06c2a5b-3760-4916-9f56-eb3fe66f24e2

@PingXie PingXie changed the title Atomic slot migration HLD [NEW] Atomic slot migration HLD Apr 15, 2024
@PingXie
Copy link
Member Author

PingXie commented Apr 15, 2024

I have an implementation. Didn't write it down yet, but I recorded a song which explains it all. Please review. https://suno.com/song/b06c2a5b-3760-4916-9f56-eb3fe66f24e2

Are you referring to #298? I will take a look next but I don't see it solving this issue?

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Apr 15, 2024

@PingXie The song is about atomic slot migration. #298 is about subscribing to slot migrations. Not the same.

@PingXie
Copy link
Member Author

PingXie commented Apr 15, 2024

@PingXie The song is about atomic slot migration.

Ship-it

@PingXie PingXie self-assigned this Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants