-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.24
-
Component/s: Networking
-
None
-
ALL
Problem Description
In MongoDB 3.4 with snappy network compressor enabled on the server, running isMaster a second time with snappy compression specified causes an error. The same sequence works on MongoDB 3.6.
Steps to Reproduce
Start a standalone MongoDB 3.4.24 instance with snappy network compression enabled in the config file. Run a mongo shell connecting to it, then run isMaster with snappy compression specified.
Note that specifying snappy network compression with the mongo shell option --networkMessageCompressors=snappy does work.
Here's an example:
[spencer@centos7 repros]$ mongo --host mongodb-local.computer MongoDB shell version v3.4.24 connecting to: mongodb://mongodb-local.computer:27017/ MongoDB server version: 3.4.24 MongoDB Enterprise > db.runCommand({isMaster: 1, compression: ["snappy"]}) 2021-02-21T13:46:03.437+0000 E QUERY [thread1] Error: Compression algorithm specified in message is not available : DB.prototype._runCommandImpl@src/mongo/shell/db.js:114:16 DB.prototype.runCommand@src/mongo/shell/db.js:125:19 @(shell):1:1 MongoDB Enterprise > db.runCommand({isMaster: 1}) 2021-02-21T13:46:12.216+0000 E QUERY [thread1] Error: Compression algorithm specified in message is not available : DB.prototype._runCommandImpl@src/mongo/shell/db.js:114:16 DB.prototype.runCommand@src/mongo/shell/db.js:125:19 @(shell):1:1 MongoDB Enterprise > show dbs 2021-02-21T13:46:32.971+0000 E QUERY [thread1] Error: Compression algorithm specified in message is not available : DB.prototype._runCommandImpl@src/mongo/shell/db.js:114:16 DB.prototype.runCommand@src/mongo/shell/db.js:125:19 Mongo.prototype.adminCommand@src/mongo/shell/mongo.js:67:12 Mongo.prototype.getDBs@src/mongo/shell/mongo.js:60:15 shellHelper.show@src/mongo/shell/utils.js:814:19 shellHelper@src/mongo/shell/utils.js:704:15 @(shellhelp2):1:1
Expected Results
The session will continue with snappy network compression enabled. This expected result is achieved with MongoDB 3.6.22, but fails with MongoDB 3.4.24.
Actual Results
See above. Not only does the isMaster cause an error, but the session is put into some kind of state where nothing works.
Additional Notes
Attaching log file