[JAVA-3151] Should the UpdateMessage mark a replacement document as collectible Created: 28/Jan/19  Updated: 28/Oct/23  Resolved: 29/Jan/19

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.10.0

Type: Task Priority: Major - P3
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It is marked as collectible for legacy messages but not for modern updates.

With the PojoCodec this could generate an _id for the update part of the replace operation.



 Comments   
Comment by Githook User [ 29/Jan/19 ]

Author:

{'username': 'rozza', 'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley'}

Message: Ensure legacy replace queries aren't marked as collectible

JAVA-3151
Branch: 3.10.x
https://github.com/mongodb/mongo-java-driver/commit/774a85550d4b5e88efd03b8192507653d5f7084b

Comment by Ross Lawley [ 29/Jan/19 ]

PR: https://github.com/rozza/mongo-java-driver/pull/313

In com.mongodb.operation.BulkWriteBatch.WriteRequestEncoder#encode only inserts are collectible.

Comment by Jeffrey Yemin [ 28/Jan/19 ]
{com.mongodb.operation.BulkWriteBatch.WriteRequestEncoder#encode}

ia also affected, and may point the way to a fix for UpdateMessage (which is rarely used anyway since it's only for unacknowledged writes now that 2.4 is no longer supported)

Generated at Thu Feb 08 08:58:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.