summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-01-04 12:19:37 -0500
committerBilly Donahue <billy.donahue@mongodb.com>2019-01-07 12:08:23 -0500
commit11bb071e91461b1f8e40b9b15ddf3b9e1a2d23d1 (patch)
tree7037865f9bf4445fb3295ca7ce72f4182f012554 /src/mongo/db/storage
parent6a0a21214dd96663c899cb8f2562d6121351ed3c (diff)
downloadmongo-11bb071e91461b1f8e40b9b15ddf3b9e1a2d23d1.tar.gz
SERVER-36644 remove AtomicWord typedefs
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/biggie/biggie_record_store.h4
-rw-r--r--src/mongo/db/storage/kv/kv_catalog.h2
-rw-r--r--src/mongo/db/storage/mobile/mobile_record_store.h2
-rw-r--r--src/mongo/db/storage/mobile/mobile_recovery_unit.cpp2
-rw-r--r--src/mongo/db/storage/mobile/mobile_recovery_unit.h2
-rw-r--r--src/mongo/db/storage/mobile/mobile_session_pool.h2
-rw-r--r--src/mongo/db/storage/mobile/mobile_sqlite_statement.cpp2
-rw-r--r--src/mongo/db/storage/mobile/mobile_sqlite_statement.h2
-rw-r--r--src/mongo/db/storage/storage_options.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h6
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h8
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.h6
17 files changed, 29 insertions, 29 deletions
diff --git a/src/mongo/db/storage/biggie/biggie_record_store.h b/src/mongo/db/storage/biggie/biggie_record_store.h
index cfbaf67e8eb..ccdd5bc28b3 100644
--- a/src/mongo/db/storage/biggie/biggie_record_store.h
+++ b/src/mongo/db/storage/biggie/biggie_record_store.h
@@ -141,8 +141,8 @@ private:
mutable stdx::mutex _cappedDeleterMutex;
- AtomicInt64 _highest_record_id{1};
- AtomicInt64 _numRecords{0};
+ AtomicWord<long long> _highest_record_id{1};
+ AtomicWord<long long> _numRecords{0};
std::string generateKey(const uint8_t* key, size_t key_len) const;
bool _isOplog;
diff --git a/src/mongo/db/storage/kv/kv_catalog.h b/src/mongo/db/storage/kv/kv_catalog.h
index fe670d3795a..05eff5ed241 100644
--- a/src/mongo/db/storage/kv/kv_catalog.h
+++ b/src/mongo/db/storage/kv/kv_catalog.h
@@ -143,7 +143,7 @@ private:
// These two are only used for ident generation inside _newUniqueIdent.
std::string _rand; // effectively const after init() returns
- AtomicUInt64 _next;
+ AtomicWord<unsigned long long> _next;
struct Entry {
Entry() {}
diff --git a/src/mongo/db/storage/mobile/mobile_record_store.h b/src/mongo/db/storage/mobile/mobile_record_store.h
index 0c31e35cd13..efab31d1c6d 100644
--- a/src/mongo/db/storage/mobile/mobile_record_store.h
+++ b/src/mongo/db/storage/mobile/mobile_record_store.h
@@ -163,7 +163,7 @@ private:
const std::string _path;
const std::string _ident;
- AtomicInt64 _nextIdNum;
+ AtomicWord<long long> _nextIdNum;
/**
* Fetches the number of records from the database. _numRecsMutex should be locked before this
diff --git a/src/mongo/db/storage/mobile/mobile_recovery_unit.cpp b/src/mongo/db/storage/mobile/mobile_recovery_unit.cpp
index cc169d956d8..97f30ccbcb7 100644
--- a/src/mongo/db/storage/mobile/mobile_recovery_unit.cpp
+++ b/src/mongo/db/storage/mobile/mobile_recovery_unit.cpp
@@ -46,7 +46,7 @@
namespace mongo {
-AtomicInt64 MobileRecoveryUnit::_nextID(0);
+AtomicWord<long long> MobileRecoveryUnit::_nextID(0);
MobileRecoveryUnit::MobileRecoveryUnit(MobileSessionPool* sessionPool)
: _inUnitOfWork(false), _active(false), _isReadOnly(true), _sessionPool(sessionPool) {
diff --git a/src/mongo/db/storage/mobile/mobile_recovery_unit.h b/src/mongo/db/storage/mobile/mobile_recovery_unit.h
index 982c0c70139..93620fe876c 100644
--- a/src/mongo/db/storage/mobile/mobile_recovery_unit.h
+++ b/src/mongo/db/storage/mobile/mobile_recovery_unit.h
@@ -99,7 +99,7 @@ private:
bool _inUnitOfWork;
bool _active;
- static AtomicInt64 _nextID;
+ static AtomicWord<long long> _nextID;
uint64_t _id;
bool _isReadOnly;
diff --git a/src/mongo/db/storage/mobile/mobile_session_pool.h b/src/mongo/db/storage/mobile/mobile_session_pool.h
index 2c9b0595de9..1c57ee45f63 100644
--- a/src/mongo/db/storage/mobile/mobile_session_pool.h
+++ b/src/mongo/db/storage/mobile/mobile_session_pool.h
@@ -57,7 +57,7 @@ public:
bool isEmpty();
private:
- AtomicBool _isEmpty;
+ AtomicWord<bool> _isEmpty;
stdx::mutex _queueMutex;
std::queue<std::string> _opQueryQueue;
};
diff --git a/src/mongo/db/storage/mobile/mobile_sqlite_statement.cpp b/src/mongo/db/storage/mobile/mobile_sqlite_statement.cpp
index 0b26d25e1e7..c0ebcfa6f9f 100644
--- a/src/mongo/db/storage/mobile/mobile_sqlite_statement.cpp
+++ b/src/mongo/db/storage/mobile/mobile_sqlite_statement.cpp
@@ -46,7 +46,7 @@
namespace mongo {
-AtomicInt64 SqliteStatement::_nextID(0);
+AtomicWord<long long> SqliteStatement::_nextID(0);
SqliteStatement::SqliteStatement(const MobileSession& session, const std::string& sqlQuery) {
// Increment the global instance count and assign this instance an id.
diff --git a/src/mongo/db/storage/mobile/mobile_sqlite_statement.h b/src/mongo/db/storage/mobile/mobile_sqlite_statement.h
index 719bc49a895..87996927902 100644
--- a/src/mongo/db/storage/mobile/mobile_sqlite_statement.h
+++ b/src/mongo/db/storage/mobile/mobile_sqlite_statement.h
@@ -131,7 +131,7 @@ public:
uint64_t _id;
private:
- static AtomicInt64 _nextID;
+ static AtomicWord<long long> _nextID;
sqlite3_stmt* _stmt;
std::string _sqlQuery;
diff --git a/src/mongo/db/storage/storage_options.h b/src/mongo/db/storage/storage_options.h
index de4bac61aa5..d2486a66858 100644
--- a/src/mongo/db/storage/storage_options.h
+++ b/src/mongo/db/storage/storage_options.h
@@ -79,11 +79,11 @@ struct StorageGlobalParams {
// --journalCommitInterval
static const int kMaxJournalCommitIntervalMs;
- AtomicInt32 journalCommitIntervalMs;
+ AtomicWord<int> journalCommitIntervalMs;
// --notablescan
// no table scans allowed
- AtomicBool noTableScan;
+ AtomicWord<bool> noTableScan;
// --directoryperdb
// Stores each database’s files in its own folder in the data directory.
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index a3c62668e37..97b2f052ed3 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -209,7 +209,7 @@ public:
private:
WiredTigerSessionCache* _sessionCache;
- AtomicBool _shuttingDown{false};
+ AtomicWord<bool> _shuttingDown{false};
};
class WiredTigerKVEngine::WiredTigerCheckpointThread : public BackgroundJob {
@@ -373,7 +373,7 @@ private:
// taking checkpoints. It can be triggered early to expediate immediate checkpointing.
stdx::condition_variable _condvar;
- AtomicBool _shuttingDown{false};
+ AtomicWord<bool> _shuttingDown{false};
bool _hasTriggeredFirstStableCheckpoint = false;
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
index ef5980de8d1..3a84c939dfc 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
@@ -104,6 +104,6 @@ private:
// journal flushing should not be delayed.
std::int64_t _opsWaitingForVisibility = 0; // Guarded by oplogVisibilityStateMutex.
- AtomicUInt64 _oplogReadTimestamp;
+ AtomicWord<unsigned long long> _oplogReadTimestamp;
};
} // namespace mongo
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
index 9cc17eb0b00..cc3ae0cefb9 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.h
@@ -349,8 +349,8 @@ private:
const int64_t _cappedMaxSizeSlack; // when to start applying backpressure
const int64_t _cappedMaxDocs;
RecordId _cappedFirstRecord;
- AtomicInt64 _cappedSleep;
- AtomicInt64 _cappedSleepMS;
+ AtomicWord<long long> _cappedSleep;
+ AtomicWord<long long> _cappedSleepMS;
CappedCallback* _cappedCallback;
bool _shuttingDown;
mutable stdx::mutex _cappedCallbackMutex; // guards _cappedCallback and _shuttingDown
@@ -359,7 +359,7 @@ private:
int _cappedDeleteCheckCount;
mutable stdx::timed_mutex _cappedDeleterMutex;
- AtomicInt64 _nextIdNum;
+ AtomicWord<long long> _nextIdNum;
WiredTigerSizeStorer* _sizeStorer; // not owned, can be NULL
std::shared_ptr<WiredTigerSizeStorer::SizeInfo> _sizeInfo;
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h
index 600b92836ec..612b964240f 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store_oplog_stones.h
@@ -141,8 +141,8 @@ private:
// deque of oplog stones.
int64_t _minBytesPerStone;
- AtomicInt64 _currentRecords; // Number of records in the stone being filled.
- AtomicInt64 _currentBytes; // Number of bytes in the stone being filled.
+ AtomicWord<long long> _currentRecords; // Number of records in the stone being filled.
+ AtomicWord<long long> _currentBytes; // Number of bytes in the stone being filled.
mutable stdx::mutex _mutex; // Protects against concurrent access to the deque of oplog stones.
std::deque<OplogStones::Stone> _stones; // front = oldest, back = newest.
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
index b2a4949f5db..e65b027686e 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
@@ -58,7 +58,7 @@ MONGO_FAIL_POINT_DEFINE(WTAlwaysNotifyPrepareConflictWaiters);
// SnapshotIds need to be globally unique, as they are used in a WorkingSetMember to
// determine if documents changed, but a different recovery unit may be used across a getMore,
// so there is a chance the snapshot ID will be reused.
-AtomicUInt64 nextSnapshotId{1};
+AtomicWord<unsigned long long> nextSnapshotId{1};
logger::LogSeverity kSlowTransactionSeverity = logger::LogSeverity::Debug(1);
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
index 3cbdb0a075e..9c0fe8078ba 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp
@@ -76,7 +76,7 @@ namespace mongo {
// will be cached in WiredTiger. Exclusive operations should only be blocked
// for a short time, except if a cursor is held by a long running session. This
// is a good compromise for most workloads.
-AtomicInt32 kWiredTigerCursorCacheSize(-100);
+AtomicWord<int> kWiredTigerCursorCacheSize(-100);
const std::string kWTRepairMsg =
"Please read the documentation for starting MongoDB with --repair here: "
@@ -216,7 +216,7 @@ void WiredTigerSession::closeCursorsForQueuedDrops(WiredTigerKVEngine* engine) {
}
namespace {
-AtomicUInt64 nextTableId(1);
+AtomicWord<unsigned long long> nextTableId(1);
}
// static
uint64_t WiredTigerSession::genTableId() {
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
index 1d91d28f799..7a87cef036e 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.h
@@ -293,7 +293,7 @@ private:
// Used as follows:
// The low 31 bits are a count of active calls to releaseSession.
// The high bit is a flag that is set if and only if we're shutting down.
- AtomicUInt32 _shuttingDown;
+ AtomicWord<unsigned> _shuttingDown;
static const uint32_t kShuttingDownMask = 1 << 31;
stdx::mutex _cacheLock;
@@ -301,13 +301,13 @@ private:
SessionCache _sessions;
// Bumped when all open sessions need to be closed
- AtomicUInt64 _epoch; // atomic so we can check it outside of the lock
+ AtomicWord<unsigned long long> _epoch; // atomic so we can check it outside of the lock
// Bumped when all open cursors need to be closed
- AtomicUInt64 _cursorEpoch; // atomic so we can check it outside of the lock
+ AtomicWord<unsigned long long> _cursorEpoch; // atomic so we can check it outside of the lock
// Counter and critical section mutex for waitUntilDurable
- AtomicUInt32 _lastSyncTime;
+ AtomicWord<unsigned> _lastSyncTime;
stdx::mutex _lastSyncMutex;
// Mutex and cond var for waiting on prepare commit or abort.
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.h b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.h
index f1ab4655ee4..3ded5e83c92 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.h
@@ -68,12 +68,12 @@ public:
~SizeInfo() {
invariant(!_dirty.load());
}
- AtomicInt64 numRecords;
- AtomicInt64 dataSize;
+ AtomicWord<long long> numRecords;
+ AtomicWord<long long> dataSize;
private:
friend WiredTigerSizeStorer;
- AtomicBool _dirty;
+ AtomicWord<bool> _dirty;
};
WiredTigerSizeStorer(WT_CONNECTION* conn,