envoyproxy/envoy

Mongo filter needs update

Open

#31.810 aperta il 12 gen 2024

Vedi su GitHub
 (4 commenti) (2 reazioni) (0 assegnatari)C++ (5373 fork)batch import
area/dependencyarea/mongodbhelp wantedno stalebot

Metriche repository

Star
 (27.997 star)
Metriche merge PR
 (Merge medio 8g) (378 PR mergiate in 30 g)

Descrizione

Title: Mongo filter is too old: needs update

Description: The mongo wire protocol has changed a lot since version 3.6 but the mongo filter remains same. In fact, the most of the opcodes that were handled in mongo filter source code(codec source file) were deprecated in mongo version 5 (see details here). OP_MSG is used instead. OP_MSG (having value 2013) isn't handled in current mongo filter for which an exception log(as programmed here)- invalid mongo op 2013 is generated in envoy log. I've seen people complained for getting this log (e.g., #5648). While I was testing this, I took tcpdump, I have seen that mongo 4.4.6 was using OP_MSG while I was making insert request from client though opcode like OP_INSERT was deprecated in version 5. Mongo Filter is too old that support pre-3.6 version of mongo that people no more use or very rarely do.

Relevant PRs(never merged): #5053 :this PR could've been the savior, I feel bad that it was too close to get merged #5198

Update::

If the node supports OP_MSG, any and all messages MUST use OP_MSG, optionally compressed with OP_COMPRESSED. Authentication messages MUST also use OP_MSG when it is supported, but MUST NOT use OP_COMPRESSED.

Source

Guida contributor