I use debian9 and debian10 mongocxx driver to insert data in mongodb 6.0. Then I use mongosh 1.6 for monitoring ops with db.currentOp. And I get an error BSONError: Invalid UTF-8 string in BSON document.
I can switch on profiling and look for ops profiles with db.system.profile.find. I see, that profile, except user data, contains driver description data, like this:
'$client': { driver: { name: 'Н\x07\x18_\x7F', version: 'kafkaclient' }, ... platform: 'networks/lib/x86_64-linux-gnu`G\b\x18_\x7F',
Such driver name DONT lead to error with BSON. But sometime I see driver description data, like this:
'$client': { driver: { name: 'Н\x07��\x7F', version: 'kafkaclient' }, ... platform: 'networks/lib/x86_64-linux-gnu`G\b��\x7F'
�� - this simbols cause the BSON error for db.system.profile.find and db.currentOp. For db.system.profile.find I can use enableUtf8Validation = false and avoid the error. But for currentOp I can't use enableUtf8Validation. But I should to use db.currentOp for ops monitoring. I have next questions:
- For the same OS, mongocxx driver, mongodb, mongosh..driver name data can to diff from session to session between c++ client and mongodb. Why?
- Can I yet disable UTF8 validation for db.currentOp?
- Why mongocxx+mongodb+debian can bourn BSON UTF8 mistake? What reason can be major: driver mongocxx, os debian, mongodb?