Speeding up slave connect: Binlog GTID indexes (MDEV-4991)
summary
Implements an on-disk B+-Tree that maps GTID to binlog file offsets so slaves no longer serially scan up to ~1.3M transactions to find a start point, replacing the linear scan with index lookups that are effectively position-independent in benchmarks. The index is prefix-compressed sparse index, written asynchronously (configurable flush frequency, e.g. ~every 10 GTIDs), adds only ~3% extra disk and is made crash-safe by rebuilding during normal binlog recovery. Prototype benchmarks show multi-second scans drop to sub-100ms index lookups.
AI-written summary · about
