diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-04-26 07:05:39 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-08 22:45:08 +0000 |
commit | 7c51aca7fd085ead0ae3e19d967ff1abf111d13a (patch) | |
tree | becfe057d3dbbb88b02ad628fb1a95a30adf686c /src/mongo/transport | |
parent | 987484b4aa34deea1db7d70228989b83448a24e8 (diff) | |
download | mongo-7c51aca7fd085ead0ae3e19d967ff1abf111d13a.tar.gz |
SERVER-40811 make initializers throwy
- Consolidate init-related headers (just init.h and initializer.h)
- Factor out a separate DependencyGraph component
- Remove MONGO_DEFAULT_PREREQUISITES, MONGO_NO_PREREQUISITES, MONGO_NO_DEPENDENTS.
- Document the role of the "default" initializer.
Diffstat (limited to 'src/mongo/transport')
4 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/transport/message_compressor_registry.cpp b/src/mongo/transport/message_compressor_registry.cpp index 90a89855048..cbb77606b92 100644 --- a/src/mongo/transport/message_compressor_registry.cpp +++ b/src/mongo/transport/message_compressor_registry.cpp @@ -134,13 +134,12 @@ MONGO_INITIALIZER_GENERAL(NoopMessageCompressorInit, (InitializerContext* context) { auto& compressorRegistry = MessageCompressorRegistry::get(); compressorRegistry.registerImplementation(std::make_unique<NoopMessageCompressor>()); - return Status::OK(); } // This cleans up any compressors that were requested by the user, but weren't registered by // any compressor. It must be run after all the compressors have registered themselves with // the global registry. MONGO_INITIALIZER(AllCompressorsRegistered)(InitializerContext* context) { - return MessageCompressorRegistry::get().finalizeSupportedCompressors(); + uassertStatusOK(MessageCompressorRegistry::get().finalizeSupportedCompressors()); } } // namespace mongo diff --git a/src/mongo/transport/message_compressor_snappy.cpp b/src/mongo/transport/message_compressor_snappy.cpp index 56384ce8854..1d926174cf5 100644 --- a/src/mongo/transport/message_compressor_snappy.cpp +++ b/src/mongo/transport/message_compressor_snappy.cpp @@ -82,6 +82,5 @@ MONGO_INITIALIZER_GENERAL(SnappyMessageCompressorInit, (InitializerContext* context) { auto& compressorRegistry = MessageCompressorRegistry::get(); compressorRegistry.registerImplementation(std::make_unique<SnappyMessageCompressor>()); - return Status::OK(); } } // namespace mongo diff --git a/src/mongo/transport/message_compressor_zlib.cpp b/src/mongo/transport/message_compressor_zlib.cpp index 599a2f5e40f..878431b2824 100644 --- a/src/mongo/transport/message_compressor_zlib.cpp +++ b/src/mongo/transport/message_compressor_zlib.cpp @@ -84,6 +84,5 @@ MONGO_INITIALIZER_GENERAL(ZlibMessageCompressorInit, (InitializerContext* context) { auto& compressorRegistry = MessageCompressorRegistry::get(); compressorRegistry.registerImplementation(std::make_unique<ZlibMessageCompressor>()); - return Status::OK(); } } // namespace mongo diff --git a/src/mongo/transport/message_compressor_zstd.cpp b/src/mongo/transport/message_compressor_zstd.cpp index 79ce2a5b0f1..22721c6e16c 100644 --- a/src/mongo/transport/message_compressor_zstd.cpp +++ b/src/mongo/transport/message_compressor_zstd.cpp @@ -82,6 +82,5 @@ MONGO_INITIALIZER_GENERAL(ZstdMessageCompressorInit, (InitializerContext* context) { auto& compressorRegistry = MessageCompressorRegistry::get(); compressorRegistry.registerImplementation(std::make_unique<ZstdMessageCompressor>()); - return Status::OK(); } } // namespace mongo |