bloomberg / comdb2

Bloomberg's distributed RDBMS
Other
1.39k stars 214 forks source link

Improved physrep matching / keepalive #4856

Closed markhannum closed 22 hours ago

markhannum commented 1 day ago

Changes to fix cases where a physical-replicant cannot possibly replicate from the source database.

An updated keepalive message will include a physical replicant's 'firstfile'. This is used by register_replicant to exclude machines whose oldest log-file is newer than the physical-replicant's newest

After connecting, we retrieve the source database's first and last LSN, and fail if we determine that it cannot possibly act as a source.

Tests verifying the behavior