[SERVER-42038] "The key is too long" after upgrading from 3.4 to 3.6 Created: 02/Jul/19  Updated: 27/Oct/23  Resolved: 16/Jul/19

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.4.21, 3.6.13
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Vincent van Megen Assignee: Eric Sedor
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Upgrade from 3.4.21 to 3.6 and run a update query.

Participants:

 Description   

After upgrading from 3.4 to 3.6 i'm getting the following errors when running simple update on some documents:

 

Fatal error: Uncaught MongoDB\Driver\Exception\BulkWriteException: The key is too long in /var/www/vendor/mongodb/mongodb/src/Operation/Update.php:179
Stack trace:
#0 /var/www/vendor/mongodb/mongodb/src/Operation/Update.php(179): MongoDB\Driver\Server->executeBulkWrite('dbname.server...', Object(MongoDB\Driver\BulkWrite), Array)
#1 /var/www/vendor/mongodb/mongodb/src/Operation/UpdateOne.php(105): MongoDB\Operation\Update->execute(Object(MongoDB\Driver\Server))
#2 /var/www/vendor/mongodb/mongodb/src/Collection.php(1033): MongoDB\Operation\UpdateOne->execute(Object(MongoDB\Driver\Server))
#3 /var/www/inc/process.php(59): MongoDB\Collection->updateOne(Array, Array, Array)
#4 /var/www/process_queue.php(101): process_data(Object(MongoDB\Model\BSONDocument))
#5 {main}
thrown in /var/www/vendor/mongodb/mongodb/src/Operation/Update.php on line 179

 

The updateOne command is updateOne({'_id': mongid}, {'$set': {'status': 'OK'}})

Downgrading to 3.4 solves this issue.

PHP mongodb version 1.5.5

db version v3.4.21
git version: ba2e818de44c9a331ce09a624780a2bd841cf6e4
OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1604
distarch: x86_64
target_arch: x86_64

 

Running on 3 dedicated servers in a replicaset (64gb ram, 1tb ssd, 8 cores).



 Comments   
Comment by Eric Sedor [ 16/Jul/19 ]

vincentvm I am going to close this ticket but if you have additional information it may help users who find this issue in the future. Thanks again!

Comment by Eric Sedor [ 03/Jul/19 ]

vincentvm; we can close this ticket if you no longer have a problem. But if you can provide details about what you found to be incorrect about the _id value and what you changed to resolve the issue, it may help other users in the future.

Comment by Vincent van Megen [ 02/Jul/19 ]

This has been resolved, apparently 3.4 didn't complain about incorrect mongoid's.

Generated at Thu Feb 08 04:59:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.