[SERVER-38778] Improve error handling on implicit collection creation in txn_override.js Created: 26/Dec/18  Updated: 27/Oct/23  Resolved: 04/Apr/19

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

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Judah Schvimer
Resolution: Gone away Votes: 0
Labels: prepare_testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-38937 Unify txn_override.js and auto_retry_... Closed
is duplicated by SERVER-38859 txn_override.js should make sure fail... Closed
Related
is related to SERVER-38782 Disable transaction kill / terminate ... Closed
is related to SERVER-38936 Create unittests for txn_override.js Closed
Operating System: ALL
Sprint: Repl 2019-01-28, Repl 2019-02-11, Repl 2019-02-25, Repl 2019-03-11, Repl 2019-03-25, Repl 2019-04-08
Participants:
Linked BF Score: 7

 Description   

The test calls assert.commandWorked(), but doesn't terminate the test as expected. Auditing all calls of assert.commandWorked in txn_override.js is needed.



 Comments   
Comment by Judah Schvimer [ 04/Apr/19 ]

This code went away with SERVER-38937.

Comment by Janna Golden [ 07/Jan/19 ]

siyuan.zhou sorry I didn't mean we necessarily want the shell to necessarily terminate if collection creation fails because we would want to retry in certain cases. If collection creation fails, we expect that the write operation that caused the collection creation to not have happened, so if we failed because of a retryable error, we expect auto_retry_on_network_error.js to catch this and retry the write operation which in turn should retry the collection creation as well. max.hirschhorn is right that the coupling of the two is difficult to understand and a possible solution would be to write a unified version to possibly simplify it.

Comment by Max Hirschhorn [ 06/Jan/19 ]

Max Hirschhorn, assert.commandWorked() implies the we want the shell to terminate if it fails according to janna.golden, but the thrown exception will be caused by a higher level and triggers the retry. Shall we distinguish unexpected errors and expected flow control using assert?

siyuan.zhou, I'm not really sure what you had in mind. The coupling between the txn_override.js and auto_retry_on_network_error.js overrides is difficult to understand at best. I would say that if we're having challenges with managing the control flow around retries from layering multiple Mongo.prototype.runCommand overrides on top of each other, then maybe we should bite the bullet and write a unified version.

Comment by Siyuan Zhou [ 05/Jan/19 ]

max.hirschhorn, assert.commandWorked() implies the we want the shell to terminate if it fails according to janna.golden, but the thrown exception will be caused by a higher level and triggers the retry. Shall we distinguish unexpected errors and expected flow control using assert?

Generated at Thu Feb 08 04:50:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.