[SERVER-17062] Make query execution robust to WriteConflictException Created: 26/Jan/15  Updated: 05/Feb/16  Resolved: 18/Mar/15

Status: Closed
Project: Core Server
Component/s: Querying, Storage
Affects Version/s: None
Fix Version/s: 3.1.0

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: WCE
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-17132 Index contains extra entries Closed
is depended on by SERVER-17119 Verify fails during AND_HASH query st... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

It should be possible to continue queries in the face of WriteConflictException (WT_ROLLBACK) by treating them like yields.



 Comments   
Comment by Githook User [ 22/Oct/15 ]

Author:

{u'username': u'igorcanadi', u'name': u'Igor Canadi', u'email': u'icanadi@fb.com'}

Message: SERVER-20650 backport recent changes from MongoRocks

This patch includes the following changes:

  • Don't lazily initialize _writeBatch
  • Abandon snapshots in commitAndRestart()
  • Use only 33% of RAM for MongoRocks block cache
  • Decrease block cache shard count to 2^6 from 2^7
  • SERVER-18844 Refresh iterators on commit()
  • SERVER-17062 Allow cursors over unique indexes with duplicates
  • Recompute dataSize and numRecords if numbers don't make sense

Signed-off-by: Ramon Fernandez <ramon@mongodb.com>
Branch: v3.0
https://github.com/mongodb/mongo/commit/2a4e6cd054ad8b1d3c54ca73fc6d852116eb89c5

Comment by Igor Canadi [ 10/Aug/15 ]

> The situations where unique indexes can contain duplicate entries are transient and should never be observable by a cursor.

Hey Mathias, I actually ported this simplification to v3.0 branch in MongoRocks. However, we're seeing the assertion trigger (i.e. we're getting "Unique index cursor seeing multiple records for key") error message. Is this assumption also true in 3.0 branch or only in 3.1?

Comment by Githook User [ 17/Feb/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-17062 rename NEED_FETCH to NEED_YIELD
Branch: master
https://github.com/mongodb/mongo/commit/2a4111960fee25453ed0974ee9eae95ec25bd556

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-17062 Make query execution handle WriteConflictExceptions where possible
Branch: master
https://github.com/mongodb/mongo/commit/5ffcf2f281d58aac6c27cbbf49407f18cb86eaf0

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-17062 Make WT index cursors tolerant of WCE

The cursor now retains it's original position if a reposition method fails.
This required abandoning the lazy loading of keys and values since we always
need to know where the cursor is positioned.

Additionally, to simplify the code, cursors over unique indexes containing
duplicate keys are now banned. The situations where unique indexes can
contain duplicate entries are transient and should never be observable by a
cursor. If a cursor ever encountered a duplicate key in a unique index, it
indicates corruption.
Branch: master
https://github.com/mongodb/mongo/commit/3d5aee54e4f45cc516d64bfef0d682e93e264258

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-17062 Move getKeys() up to IndexAccessMethod and make const
Branch: master
https://github.com/mongodb/mongo/commit/4577311195bfab391d05c7e1862e0653771295e5

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-17062 WiredTigerRecordStore::Iterator WriteConflict work
Branch: master
https://github.com/mongodb/mongo/commit/2d359dfdd24629681742611f6120ffb504ac718f

Comment by Githook User [ 13/Feb/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-17062 AuthIndex should use createIndexOnEmptyCollection

It was using ensureIndex which is illegal inside of a WUOW.
Branch: master
https://github.com/mongodb/mongo/commit/75f2927bf28b64ad2221192c6efc724af63d17cd

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