Skip to content
Snippets Groups Projects
  • Vladimir Davydov's avatar
    480c55b6
    replication: keep header when request is modified by before_replace · 480c55b6
    Vladimir Davydov authored
    When space.before_replace trigger modifies the result of a remote
    operation, we clear the request header so that it gets rebuilt on
    commit. This is incorrect, because as a result we don't bump the
    master's component of the replica's vclock, which leads to the request
    being applied again when the replica reconnects. The issue manifests
    itself in sporadic replication/before_replace test failures.
    
    Fix it by updating the request header rather than clearing it so that
    replica id and lsn get preserved.
    
    Closes #3722
    480c55b6
    History
    replication: keep header when request is modified by before_replace
    Vladimir Davydov authored
    When space.before_replace trigger modifies the result of a remote
    operation, we clear the request header so that it gets rebuilt on
    commit. This is incorrect, because as a result we don't bump the
    master's component of the replica's vclock, which leads to the request
    being applied again when the replica reconnects. The issue manifests
    itself in sporadic replication/before_replace test failures.
    
    Fix it by updating the request header rather than clearing it so that
    replica id and lsn get preserved.
    
    Closes #3722
request.c 6.51 KiB