[JAVA-4821] Close operation on GridFsUploadStream is not idempotent Created: 30/Nov/22 Updated: 28/Oct/23 Resolved: 05/Dec/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 4.8.0 |
| Fix Version/s: | 4.8.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Konrad Endruszkiewicz | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Description |
SummaryClose operation is no longer idempotent due to change of the synchronization method. Calling more than once close operation on the stream tries to store file that many times (even if "closed" flag is set to true). This is due to return statement that previously was there for fast quit from the method, now just quits the Runnable. Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).mongodb-driver-sync:4.8.0 the change that introduced that: https://github.com/mongodb/mongo-java-driver/commit/3ef3747d39fba98eb041f915e2377df7afd46c08 How to Reproduce
Additional BackgroundPlease provide any additional background information that may be helpful in diagnosing the bug. |
| Comments |
| Comment by Githook User [ 05/Dec/22 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Move check for previous value of "closed" outside of lambda (#1058)
|
| Comment by Githook User [ 05/Dec/22 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Move check for previous value of "closed" outside of lambda (#1058)
|
| Comment by Jeffrey Yemin [ 30/Nov/22 ] |
|
Thanks for finding this. Working on a fix now. |