yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[xCluster] Improve performance of IsBootstrapRequired #17998

Open hari90 opened 1 year ago

hari90 commented 1 year ago

Jira Link: DB-7059

Description

IsBootstrapRequired is O(tablets) problem. This should be converted into a O(1) problem if possible.

With DB level replication can we checkpoint OpId 0 always?

Or should we just handle this in GetChanges once we get per-table xCluster RBS support?

Warning: Please confirm that this issue does not contain any sensitive information

hari90 commented 7 months ago

For DB Scoped replication we create all streams in Master and during checkpointing/bootstrap only get the opid

hari90 commented 1 week ago

The preferred approach is to always return true and let YBA force a backup restore of the db. Even if there is no data. This is because we require the oids to match for custom user types which requires a backup restore.