Skip to content
Snippets Groups Projects
user avatar
Serge Petrenko authored
Sign local space requests with a zero instance id. This allows to split
local changes aside from the changes, which should be visible to the whole
cluster, and stop sending NOPs to replicas to follow local vclock.

Moreover, it fixes the following bug with local spaces and replication.
In a situation when there are a master and a replica set up, replica may
still write to local spaces even if it's read-only. Local space
operations used to promote instance's lsn before this patch. Eventually,
master would have vclock {1:x} and replica'd have vclock {1:x, 2:y},
where y > 0, due to local space requests performed by the replica.
If a snapshot happens on replica side, replica will delete it's .xlog
files prior to the snapshot, since no one replicates from it and thus it
doesn't have any registered GC consumers.
From this point, every attempt to configure replication from replica to
master will fail, since master will try to fetch records which account
for the difference in master's and replica's vclocks: {1:x} vs {1:x,2:y},
even though master will never need the rows in range {2:1} - {2:y},
since they'll be turned to NOPs during replication.

Starting from this patch, in the situation described above, replica's
clock will be {0:y, 1:x}, and, since local space requests are now not
replicated at all, master will be able to follow replica, turning the
configuration to master-master.

Closes #4114
7eb4650e
History
Name Last commit Last update
..
upgrade
bad_run_indexes.lua
bloom.result
bloom.test.lua
cache.result
cache.test.lua
compact.result
compact.test.lua
constraint.result
constraint.test.lua
ddl.result
ddl.test.lua
deferred_delete.result
deferred_delete.test.lua
dump_stress.result
dump_stress.test.lua
errinj.result
errinj.test.lua
errinj_ddl.result
errinj_ddl.test.lua
errinj_gc.result
errinj_gc.test.lua
errinj_stat.result
errinj_stat.test.lua
errinj_tx.result
errinj_tx.test.lua
errinj_vylog.result
errinj_vylog.test.lua
force_recovery.lua
gc.result
gc.test.lua
gh-4810-dump-during-index-build.result
gh-4810-dump-during-index-build.test.lua
gh.result
gh.test.lua
hermitage.result
hermitage.test.lua
iterator.result
iterator.test.lua
json.result
json.test.lua
large.lua
large.result
large.test.lua
layout.result
layout.test.lua
low_quota.lua
misc.result
misc.test.lua
mvcc.result
mvcc.test.lua
on_replace.result
on_replace.test.lua
options.result
options.test.lua
parallel.result
parallel.test.lua
partial_dump.result
partial_dump.test.lua
quota.result
quota.test.lua
quota_timeout.result
quota_timeout.test.lua
recover.result
recover.test.lua
recovery_quota.result
recovery_quota.test.lua
replica_quota.lua
replica_quota.result
replica_quota.test.lua
replica_rejoin.lua
replica_rejoin.result
replica_rejoin.test.lua
savepoint.result
savepoint.test.lua
select_consistency.result
select_consistency.test.lua
snap_io_rate.result
snap_io_rate.test.lua
snapshot.result
snapshot.test.lua
split_coalesce.result
split_coalesce.test.lua
stat.lua
stat.result
stat.test.lua
stress.lua
stress.result
stress.test.lua
suite.cfg
suite.ini
throttle.result
throttle.test.lua
tx_conflict.result
tx_conflict.test.lua
tx_gap_lock.result
tx_gap_lock.test.lua
tx_serial.result
tx_serial.test.lua
txn_proxy.lua