diff options
author | Mathias Stearn <mathias@10gen.com> | 2015-02-10 18:58:16 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2015-02-13 15:29:33 -0500 |
commit | 1c7d3ea807e2ba756384daef7bbb0de7c334b47d (patch) | |
tree | a6d3f7b15c05a033eece7e8c921db4aed11dbfe9 /src | |
parent | 133c6fce830e9380f8fedf168de4a55b90904f52 (diff) | |
download | mongo-1c7d3ea807e2ba756384daef7bbb0de7c334b47d.tar.gz |
SERVER-17249 filemd5 shouldn't reuse CanonicalQuery after WCE
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 15c0e094f68..db5a64f8b96 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -685,13 +685,13 @@ namespace mongo { BSONObj query = BSON( "files_id" << jsobj["filemd5"] << "n" << GTE << n ); BSONObj sort = BSON( "files_id" << 1 << "n" << 1 ); - CanonicalQuery* cq; - if (!CanonicalQuery::canonicalize(ns, query, sort, BSONObj(), &cq).isOK()) { - uasserted(17240, "Can't canonicalize query " + query.toString()); - return 0; - } - MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN { + CanonicalQuery* cq; + if (!CanonicalQuery::canonicalize(ns, query, sort, BSONObj(), &cq).isOK()) { + uasserted(17240, "Can't canonicalize query " + query.toString()); + return 0; + } + // Check shard version at startup. // This will throw before we've done any work if shard version is outdated // We drop and re-acquire these locks every document because md5'ing is expensive |