An error occurred while fetching folder content.
Vladimir Davydov
authored
This reverts commit b5b4809c. The commit reverted by this patch made relay advance the consumer associated with a replica right on subscribe. This is wrong, because the current implementation of the garbage collector operates on vclock signatures so that if a replica reconnects with a greater signature than it had when it last disconnected (e.g. due to replica local changes or changes pulled from other members of the cluster), the garbage collector may delete WAL files still needed by the replica, breaking replication. There are two ways to fix this problem. The first and the most difficult way is to teach the garbage collector to work with vclocks, i.e. rather than simply sorting all consumers by signature and using the smallest signature for garbage collection, maintain a vclock each component of which is the minimum among corresponding components of all registered consumers. The second (easy) way is to advance a consumer only if its acknowledged vclock is greater than or equal to the vclock of a WAL fed to it. This way the garbage collector still works with vclock signatures and it's a responsibility of the caller (i.e. relay) to ensure that consumers are advanced correctly. I took on the second way for now, because I couldn't figure out an efficient way to implement the first. This implies reverting the above mentioned commit and reopening #4034 - sporadic replication/gc.test.lua failure - which will have to be fixed some other way. See the next patch for the rest of the fix and the test. Needed for #4106
Name | Last commit | Last update |
---|