diff options
author | Will Korteland <will.korteland@mongodb.com> | 2023-01-04 21:45:56 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-05 00:38:04 +0000 |
commit | 5e795244bbe55264a6837025618b37bdb310edfb (patch) | |
tree | e0e7a5c98cbfdb0d186965e9cd2dd47f4ed5b3c8 /src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp | |
parent | 3f66b8d5a2d8191d3616883da6c47bf6824896df (diff) | |
download | mongo-5e795244bbe55264a6837025618b37bdb310edfb.tar.gz |
Import wiredtiger: f71af27c5a39b1490a5f78029d205280cfd03174 from branch mongodb-master
ref: 8f0a6e229b..f71af27c5a
for: 6.3.0-rc0
WT-9974 Enforce C and C++ style commenting in WiredTiger
Diffstat (limited to 'src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp')
-rw-r--r-- | src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp b/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp index 4010c5bcf99..14a09f6b63f 100644 --- a/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp +++ b/src/third_party/wiredtiger/ext/storage_sources/s3_store/s3_storage_source.cpp @@ -82,9 +82,11 @@ struct S3FileSystem { // Must come first - this is the interface for the file system we are implementing. WT_FILE_SYSTEM fileSystem; S3Storage *storage; - // The S3_FILE_SYSTEM is built on top of the WT_FILE_SYSTEM. We require an instance of the - // WT_FILE_SYSTEM in order to access the native WiredTiger filesystem functionality, such as the - // native WT file handle open. + /* + * The S3_FILE_SYSTEM is built on top of the WT_FILE_SYSTEM. We require an instance of the + * WT_FILE_SYSTEM in order to access the native WiredTiger filesystem functionality, such as the + * native WT file handle open. + */ WT_FILE_SYSTEM *wtFileSystem; S3Connection *connection; std::string cacheDir; // Directory for cached objects @@ -95,9 +97,11 @@ struct S3FileHandle { WT_FILE_HANDLE iface; // Must come first S3Storage *storage; // Enclosing storage source - // Similarly, The S3FileHandle is built on top of the WT_FILE_HANDLE. We require an instance of - // the WT_FILE_HANDLE in order to access the native WiredTiger filehandle functionality, such as - // the native WT file handle read and close. + /* + * Similarly, The S3FileHandle is built on top of the WT_FILE_HANDLE. We require an instance of + * the WT_FILE_HANDLE in order to access the native WiredTiger filehandle functionality, such as + * the native WT file handle read and close. + */ WT_FILE_HANDLE *wtFileHandle; }; @@ -527,9 +531,11 @@ S3CustomizeFileSystem(WT_STORAGE_SOURCE *storageSource, WT_SESSION *session, con awsConfig.region = region; awsConfig.throughputTargetGbps = throughputTargetGbps; - // Get the directory to setup the cache, or use the default one. The default cache directory is - // named "cache-<name>", where name is the last component of the bucket name's path. We'll - // create it if it doesn't exist. + /* + * Get the directory to setup the cache, or use the default one. The default cache directory is + * named "cache-<name>", where name is the last component of the bucket name's path. We'll + * create it if it doesn't exist. + */ WT_CONFIG_ITEM cacheDirConf; std::string cacheDir; std::string cacheStr; @@ -736,17 +742,21 @@ S3Terminate(WT_STORAGE_SOURCE *storageSource, WT_SESSION *session) if (--s3->referenceCount != 0) return (0); - // It is currently unclear at the moment what the multi-threading will look like in the - // extension. The current implementation is NOT thread-safe, and needs to be addressed in the - // future, as multiple threads could call terminate leading to a race condition. + /* + * It is currently unclear at the moment what the multi-threading will look like in the + * extension. The current implementation is NOT thread-safe, and needs to be addressed in the + * future, as multiple threads could call terminate leading to a race condition. + */ while (!s3->fhList.empty()) { S3FileHandle *fs = s3->fhList.front(); S3FileClose((WT_FILE_HANDLE *)fs, session); } - // Terminate any active filesystems. There are no references to the storage source, so it is - // safe to walk the active filesystem list without a lock. The removal from the list happens - // under a lock. Also, removal happens from the front and addition at the end, so we are safe. + /* + * Terminate any active filesystems. There are no references to the storage source, so it is + * safe to walk the active filesystem list without a lock. The removal from the list happens + * under a lock. Also, removal happens from the front and addition at the end, so we are safe. + */ while (!s3->fsList.empty()) { S3FileSystem *fs = s3->fsList.front(); S3FileSystemTerminate(&fs->fileSystem, session); |