Created
August 21, 2015 00:16
-
-
Save vadimtk/dacf35dabaa2dd5cde0e to your computer and use it in GitHub Desktop.
skipPessimisticLocking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff | |
diff --git a/SConstruct b/SConstruct | |
index f5bd5af..ad8af53 100644 | |
--- a/SConstruct | |
+++ b/SConstruct | |
@@ -898,6 +898,7 @@ if darwin: | |
elif linux: | |
env.Append( LIBS=['m'] ) | |
+ env.Append( CCFLAGS=[ "-fno-omit-frame-pointer" ] ) | |
if os.uname()[4] == "x86_64" and not force32: | |
linux64 = True | |
@@ -1082,7 +1083,7 @@ if nix: | |
# -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. | |
env.Append( CCFLAGS=["-fPIC", | |
"-fno-strict-aliasing", | |
- "-ggdb", | |
+ "-g", | |
"-pthread", | |
"-Wall", | |
"-Wsign-compare", | |
diff --git a/src/mongo/db/storage/kv/dictionary/kv_dictionary.h b/src/mongo/db/storage/kv/dictionary/kv_dictionary.h | |
index 577f560..6f79051 100644 | |
--- a/src/mongo/db/storage/kv/dictionary/kv_dictionary.h | |
+++ b/src/mongo/db/storage/kv/dictionary/kv_dictionary.h | |
@@ -141,7 +141,7 @@ namespace mongo { | |
* Status::OK() success, value contains and owned slice. | |
* Status::code() == ErrorCodes::NoSuchKey when no key was found, value is not populated. | |
*/ | |
- virtual Status get(OperationContext *opCtx, const Slice &key, Slice &value, bool skipPessimisticLocking=false) const = 0; | |
+ virtual Status get(OperationContext *opCtx, const Slice &key, Slice &value, bool skipPessimisticLocking=true) const = 0; | |
/** | |
* Insert `key' into the dictionary and associate it with `value', | |
diff --git a/src/mongo/db/storage/kv/dictionary/kv_record_store.h b/src/mongo/db/storage/kv/dictionary/kv_record_store.h | |
index a1005ff..330e372 100644 | |
--- a/src/mongo/db/storage/kv/dictionary/kv_record_store.h | |
+++ b/src/mongo/db/storage/kv/dictionary/kv_record_store.h | |
@@ -94,7 +94,7 @@ namespace mongo { | |
virtual bool findRecord( OperationContext* txn, | |
const RecordId& loc, | |
RecordData* out, | |
- bool skipPessimisticLocking=false ) const; | |
+ bool skipPessimisticLocking=true ) const; | |
virtual void deleteRecord( OperationContext* txn, const RecordId& dl ); | |
@@ -229,7 +229,7 @@ namespace mongo { | |
// Internal version of dataFor that takes a KVDictionary - used by | |
// the RecordIterator to implement dataFor. | |
- static RecordData _getDataFor(const KVDictionary* db, OperationContext* txn, const RecordId& loc, bool skipPessimisticLocki | |
+ static RecordData _getDataFor(const KVDictionary* db, OperationContext* txn, const RecordId& loc, bool skipPessimisticLocki | |
// Generate the next unique RecordId key value for new records stored by this record store. | |
RecordId _nextId(); | |
diff --git a/src/mongo/db/storage/kv/kv_catalog.h b/src/mongo/db/storage/kv/kv_catalog.h | |
index ab8a224..a2d295d 100644 | |
--- a/src/mongo/db/storage/kv/kv_catalog.h | |
+++ b/src/mongo/db/storage/kv/kv_catalog.h | |
@@ -99,7 +99,7 @@ namespace mongo { | |
BSONObj _findEntry( OperationContext* opCtx, | |
const StringData& ns, | |
RecordId* out=NULL, | |
- bool skipPessimisticLocking=false ) const; | |
+ bool skipPessimisticLocking=true ) const; | |
/** | |
* Generates a new unique identifier for a new "thing". | |
diff --git a/src/mongo/db/storage/tokuft/tokuft_dictionary.cpp b/src/mongo/db/storage/tokuft/tokuft_dictionary.cpp | |
index 98913ef..28333b4 100644 | |
--- a/src/mongo/db/storage/tokuft/tokuft_dictionary.cpp | |
+++ b/src/mongo/db/storage/tokuft/tokuft_dictionary.cpp | |
@@ -79,7 +79,7 @@ namespace mongo { | |
return _getTokuRU(opCtx)->txn(opCtx); | |
} | |
- int _getWriteFlags(OperationContext *opCtx, bool skipPessimisticLocking=false) { | |
+ int _getWriteFlags(OperationContext *opCtx, bool skipPessimisticLocking=true) { | |
return (skipPessimisticLocking || _isReplicaSetSecondary(opCtx)) | |
? DB_PRELOCKED_WRITE | |
: 0; | |
diff --git a/src/mongo/db/storage/tokuft/tokuft_dictionary.h b/src/mongo/db/storage/tokuft/tokuft_dictionary.h | |
index 30f7713..09e244d 100644 | |
--- a/src/mongo/db/storage/tokuft/tokuft_dictionary.h | |
+++ b/src/mongo/db/storage/tokuft/tokuft_dictionary.h | |
@@ -115,7 +115,7 @@ namespace mongo { | |
bool _ok; | |
}; | |
- virtual Status get(OperationContext *opCtx, const Slice &key, Slice &value, bool skipPessimisticLocking=false) const; | |
+ virtual Status get(OperationContext *opCtx, const Slice &key, Slice &value, bool skipPessimisticLocking=true) const; | |
virtual Status dupKeyCheck(OperationContext *opCtx, const Slice &lookupLeft, const Slice &lookupRight, const RecordId &id); | |
virtual bool supportsDupKeyCheck() const { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment