[GODRIVER-430] bson.Document.Delete and bson.Document.Prepend are subtly broken Created: 25/May/18 Updated: 28/Oct/23 Resolved: 30/May/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 0.0.5 |
| Fix Version/s: | 0.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | GODRIVER BSON public API improvements |
| Description |
|
The Delete and Prepend methods for bson.Document are broken. The Delete method does not reorder the index used to find a key, so when a document there is a chance that other documents cannot be deleted after. Prepend does not properly reindex the document, so when an item is prepended it is not given a proper entry into the sorted index. To solve the Delete and Prepend method issues, do a complete reindex after these methods are called to ensure that the index is properly sorted. |
| Comments |
| Comment by Githook User [ 30/May/18 ] |
|
Author: {'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}Message: Fix Delete and Prepend methods to update index Fixes the bson.Document.Delete and bson.Document.Prepend methods to Change-Id: I9852541b5b7c39ee9f32f3359a91cb7612edb6e5 |
| Comment by Kristofer Brandow (Inactive) [ 26/May/18 ] |
|
Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/412578. |