citus icon indicating copy to clipboard operation
citus copied to clipboard

don't send unnecessary cancels

Open thanodnl opened this issue 5 years ago • 1 comments

DESCRIPTION: don't send unnecessary cancels

Citus blindly sent cancelations to the workers in case of a connection shutdown, or a ROLLBACK TO SAVEPOINT. These cancel requests are handy to speedup the shutdown of a connection by stopping any query that was in progress.

Due top race-yness of networks, and a bug in pgbouncer (https://github.com/pgbouncer/pgbouncer/issues/245) these cancelations might inadvertently cancel subsequent commands sent to the server. To limit the impact of the bug and race-yness of networks we can safely omit sending the cancel if no query is currently being executed on the connection.

thanodnl avatar Oct 23 '20 13:10 thanodnl

Codecov Report

Merging #4271 into master will decrease coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4271      +/-   ##
==========================================
- Coverage   91.84%   91.82%   -0.03%     
==========================================
  Files         189      189              
  Lines       36842    36846       +4     
==========================================
- Hits        33838    33834       -4     
- Misses       3004     3012       +8     

codecov[bot] avatar Oct 23 '20 13:10 codecov[bot]