25.02.2021 17:27, Dimitry Sibiryakov wrote:
AFAIK replication server resend transactions using control files, replication sequence and DB UUID received from INF call. INF call for remote database is ok, control files can be in local FS as normally and replication packet is sent through IReplicator to remote side just fine so where is the problem?
So you suggest to "clone" the control file based logic and put it inside the journaling code at the primary instance. This may work. However:
1) On the replica side, we have independent streams for different replica databases. So the queues are advanced (and old segments are removed) independently. On the primary side, we have a single journal to be sent to all replicas. Multiple control files are OK, but the engine must check all of them to calculate MIN(sequence) to remove old segments.
2) I have intention to move the control file into the replica database (new system table). For the replica it's OK to know where it's replicated from and its current replication position. For the primary database it's somewhat counter-intuitive -- is it info for the subscriber or for the publisher.
Dmitry Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel