summaryrefslogtreecommitdiff
path: root/src/mongo/db/wire_version.h
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2016-11-07 15:00:15 -0500
committerJonathan Reams <jbreams@mongodb.com>2016-11-08 13:03:08 -0500
commit96686d8572eea8316eab9675d2dfa3dfce5b998e (patch)
tree4a633a61d0d72ba0a9b7862b4cf35e87173b53c0 /src/mongo/db/wire_version.h
parent807d098fa8f41d318ffb5559ce8438c4e8372a84 (diff)
downloadmongo-96686d8572eea8316eab9675d2dfa3dfce5b998e.tar.gz
SERVER-26715 Set default values for WireSpec min/max values
Diffstat (limited to 'src/mongo/db/wire_version.h')
-rw-r--r--src/mongo/db/wire_version.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/wire_version.h b/src/mongo/db/wire_version.h
index 2b33b8c5578..4dbab63f778 100644
--- a/src/mongo/db/wire_version.h
+++ b/src/mongo/db/wire_version.h
@@ -66,6 +66,10 @@ enum WireVersion {
// Supports all write commands take a write concern.
COMMANDS_ACCEPT_WRITE_CONCERN = 5,
+
+ // Set this to the highest value in this enum - it will be the default maxWireVersion for
+ // the WireSpec values.
+ LATEST_WIRE_VERSION = COMMANDS_ACCEPT_WRITE_CONCERN,
};
/**
@@ -106,14 +110,14 @@ struct WireSpec {
// incoming.maxWireVersion - Latest version that the server accepts on incoming requests. This
// should always be at the latest entry in WireVersion.
- WireVersionInfo incoming;
+ WireVersionInfo incoming = {RELEASE_2_4_AND_BEFORE, LATEST_WIRE_VERSION};
// outgoing.minWireVersion - Minimum version allowed on remote nodes when the server sends
// requests. We should bump this whenever we don't want to connect to clients that are too old.
// outgoing.maxWireVersion - Latest version allowed on remote nodes when the server sends
// requests.
- WireVersionInfo outgoing;
+ WireVersionInfo outgoing = {RELEASE_2_4_AND_BEFORE, LATEST_WIRE_VERSION};
// Set to true if the client is internal to the cluster---this is a mongod or mongos connecting
// to another mongod.