| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also, use thread_local everywhere for our thread specific data needs
and remove the legacy support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inclusion of a sha256 digest of the full username to the logical session
id (in addition to the current guid) is necessary to fully disambiguate
logical sessions in degraded clusters (when the authoritative record for
a session is unreachable).
Semantics for the uid are as follows:
session creation via startSession()
* Sessions can only be created with one, and only one, user authenticated
* The composite key is created from a guid created on the spot, as well
as the digest of the currently auth'd username
* Only the session guid is returned to the user
* This prevents outside users from attempting to send back a value
we'd have to check. It's preferable to decorate the guid with the
user digest per command, rather than having to check a value the user
might send.
session use for a command
* Sessions are passed via the lsid top level field in any command
* Sessions are only meaningful for commands which requireAuth. For
sessions which don't require auth, we strip session information from the
command at parse time
* Session ids are passed as an object, which can optionally include the
username digest
* It is illegal to pass the username digest unless the currently
auth'd user has the impersonate privilege (the __system user does).
This enables sessions on shard servers via mongos
|
| |
|
|
|
|
|
|
| |
As part of this change also moves ShardingCatalogManager to be a
decoration on ServiceContext and decouples the dependency between the
'connPoolStats' command and ShardingCatalogManager.
|
| |
|
| |
|
|
|
|
| |
Also makes the session state available on the OperationContext.
|
|
|
|
|
| |
Also hooks it with the replication subsystem and ensures the collection is
created on promotion to primary.
|
| |
|
| |
|
|
|
|
|
|
| |
In service of making it easier to stand up mongodb in a library let's
separate out mongodbmain into its own library and structure db.cpp to
link to it, rather than including all of the setup in the final .cpp.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Presently it directly calls `assembleResponse`, which is responsible
for a cyclic dependency. This functionality is available through
the `ServiceContext` mechanism, and thus needn't directly use
`assembleResponse`.
The `ServiceEntryPoint` member of `ServiceContext` is set through
a setter, which isn't always called, so we initialize the global
entry through a factory function.
This also removes the superfluous argument for `HostAndPort`, as
that was used to track whether the call was made from within the
`DbDirectClient` object itself or from the network -- a separate
bit in the `OperationContext` indicates that state.
|
|
|
|
| |
This reverts commit 36351fdb8642bed4fd977e8234b6ff16cf5e7da2.
|
|
|
|
|
|
|
|
|
|
|
| |
Presently it directly calls `assembleResponse`, which is responsible
for a cyclic dependency. This functionality is available through
the `ServiceContext` mechanism, and thus needn't directly use
`assembleResponse`.
The `ServiceEntryPoint` member of `ServiceContext` is set through
a setter, which isn't always called, so we initialize the global
entry through a factory function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Any command sent to the server that exceeds the depth limit will fail. This also prevents users from
inserting documents that exceed the depth limit.
|
|
|
|
| |
Attach logical time metadata to all outgoing messages and process incoming logical time metadata in mongod
|
| |
|
| |
|
|
|
|
| |
Fold its contents in the mongod-side of sharding.
|
| |
|
|
|
|
|
|
| |
with the exception of:
- NetworkInterfaceCollectionRangeDeleter-TaskExecutor (doesn't really use network)
- AddShard-TaskExecutor (destination shard is still not part of cluster)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a SCons invocation like the following to attach to the correct SDK
and targeting options.
// macOS native build:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" CC=`xcrun -f --sdk macosx clang` CXX=`xcrun -f --sdk macosx clang++`all
// iOS Cross:
> python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphoneos clang` CXX=`xcrun -f --sdk iphoneos clang++` TARGET_OS=iOS TARGET_ARCH=aarch64 all
// iOS Simulator Cross:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphonesimulator clang` CXX=`xcrun -f --sdk iphonesimulator clang++` TARGET_OS=iOS-sim all
// tvOS Cross:
> python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvos clang` CXX=`xcrun -f --sdk appletvos clang++` TARGET_OS=tvOS TARGET_ARCH=aarch64 all
// tvOS Simulator Cross:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvsimulator clang` CXX=`xcrun -f --sdk appletvsimulator clang++` TARGET_OS=tvOS-sim
To run the resulting binaries under the simulator, boot a particular
target machine with 'xcrun simctl':
> xcrun simctl boot 'Apple TV 1080p'
Find the ID of the instance that was booted:
> xcrun simctl list | grep 'Apple TV 1080p'
And then spawn the intended binary inside the simulator with that ID:
> xcrun simctl spawn CEEC6346-6D21-4092-A091-E5A3862A357F build/opt/mongo/mongod --dbpath=tmp
|
| |
|
|
|
|
|
|
|
|
| |
The `src/mongo/db.cpp` file is compiled into the main server program,
and causes broken-dependency issues in linking the enterprise modules.
By moving this symbol to another file, we can better express this
dependency. Further, this change lays the groundwork to switch from
from a pointer to function to a `std::function< void () >` object.
|
|
|
|
|
|
|
| |
Allow `incomplete` for the time being to prevent breaking code in
enterprise. The cycle/incomplete exemption has been renamed to
`illegal_cyclic_or_unresolved_dependencies_whitelisted`, to discourage
overuse. Removed the incompletes that we can.
|
|
|
|
|
| |
The global `environ` is not supplied by any libraries on FreeBSD,
and its math library is not in libc.
|
| |
|
|
|
|
| |
Enjoy the C++14! 😀 ❤️ thank you!
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
No functional changes. Removes unused includes and libraries and moves
cluster_write.cpp to be only part of the mongos commands since it is not
used elsewhere.
|
|
|
|
| |
mongo/base library.
|
| |
|
|
|
|
| |
This reverts commit 92bdb7b398f29bcaef88da18c7a2df03f07e77ca.
|