[GODRIVER-3063] Generate new ObjectID only when required Created: 04/Dec/23 Updated: 12/Dec/23 Resolved: 12/Dec/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.0, 1.14.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Qingyang Hu | Assignee: | Qingyang Hu |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
ContextExternal PR: https://github.com/mongodb/mongo-go-driver/pull/1479 any insert operation preemptively generates new ObjectID to check/ensure if _id exists in doc or not - but chances are that goes to waste. this waste is more pronounced in scenarios where _id is a mix of custom userland id and system generated one across collections of a db or even across documents of same collection Definition of doneWhat must be done to consider the task complete? PitfallsWhat should the implementer watch out for? What are the risks? |