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

[docdb][2dc] Integration of 2DC with tablet splitting #5373

Closed
bmatican opened this issue Aug 11, 2020 · 3 comments
Closed

[docdb][2dc] Integration of 2DC with tablet splitting #5373

bmatican opened this issue Aug 11, 2020 · 3 comments
Assignees
Labels
area/cdc Change Data Capture area/docdb YugabyteDB core features
Milestone

Comments

@bmatican
Copy link
Contributor

Notes from @rahuldesirazu on potential cheap path forward

  • The consumer CM has to subscribe to tablet splits on the producer side (either through a HB mechanism or through some push based mechanic from the producer).
  • The consumer LB needs to have a path both for adding recently split tablets to the cdc map and moving around tablets in the map to keep polling work balanced.
@bmatican bmatican added area/docdb YugabyteDB core features area/cdc Change Data Capture labels Aug 11, 2020
@bmatican bmatican self-assigned this Aug 11, 2020
@bmatican bmatican assigned nspiegelberg and unassigned bmatican Sep 10, 2020
@bmatican bmatican added this to the 2.7.x milestone Mar 19, 2021
@bmatican bmatican assigned abigalekim and unassigned nspiegelberg Jul 1, 2021
@abigalekim
Copy link
Contributor

Implementation design decision notes:
Where in the codebase are we updating the tablet mapping?

  • The tablet mapping should be updated within the consumer TServer nodes.
  • The node that updates the mapping should then write a SPLIT_OP to the consumer master’s WAL.
  • When the consumer master reads this SPLIT_OP, then we update the mapping via the CDCPoller
  • This could potentially be a source of latency, but because the main operation with splitting at the TServer level is that it creates hard links at the RockDB level, then copies the Raft Log index file (this is a fast operation, taking less than a millisecond), it should be fine in terms of latency.
  • An additional design decision we need to consider is how to tell whether we are reading from a split tablet that hasn’t been updated in master yet
  • We can solve this by keeping a metric to keep maximum staleness, take note if we’re ever reading from a split tablet given split timestamp, then we take this timestamp and subtract it from previous timestamp

We can create an UpdateTabletMapping function that is called in the CatalogManager, similar to CreateTabletMapping.
It’s currently called UpdateCDCConsumer and is in ent/catalog_manager module.

@nspiegelberg
Copy link
Contributor

Duplicate of #10175

@nspiegelberg nspiegelberg marked this as a duplicate of #10175 Oct 18, 2021
@hulien22
Copy link
Contributor

Closing in favour of #10175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cdc Change Data Capture area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

4 participants