[SERVER-9839] abort running ops on step down Created: 31/May/13  Updated: 23/Mar/15  Resolved: 03/Mar/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matt Dannenberg Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: elections
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

In a replica set, upon step down from being the primary, any running operation that could not have been created in the new state should be aborted. I think that currently we just wait until we hit the closed socket that sent the operation. While ideally we wouldn't bother running the operation since it will fail anyway in the best case and should not be run in the worst. We should give some consideration to whether the operation is a read or write. Eg, an indexBuild on the primary should be aborted if it has not been replicated to the secondaries prior to step down.



 Comments   
Comment by Matt Dannenberg [ 03/Mar/15 ]

fixed in 3.0

Comment by Eric Milkie [ 31/May/13 ]

I suppose we could rerun the repl_reads_ok check in checkForInterrupt(), at least for simple queries. But I'm not sure we have all the info we need, and the logic is different for commands and writes anyway.

Generated at Thu Feb 08 03:21:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.