[SERVER-57925] Refactor DBClientBase API not to use flags bit vector Created: 22/Jun/21 Updated: 28/Jun/22 Resolved: 28/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Irina Yatsenko (Inactive) | Assignee: | Irina Yatsenko (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
According to David Storch, the "flags" bit vector is a bit of an artifact of the old wire protocol, since OP_INSERT, OP_DELETE, and OP_UPDATE each included such a bit vector. We could modernize the DBClientBase API now to use enums or named arguments instead. |
| Comments |
| Comment by Mickey Winters [ 28/Jun/22 ] |
|
fixed by irina in https://github.com/mongodb/mongo/commit/1f64d42977db0572b08d7ab19133bc3f21323ce0 |
| Comment by David Storch [ 28/Jun/21 ] |
|
ethan.zhang I also had trouble finding many callers that actually pass a non-default value for flags with a cursory search of the code base. That's good news, since it means that this ticket hopefully wouldn't require changes to a large number of call sites. However, I think there are at least a handful that would need to change. For example, here's one which was recently modified by Irina's patch for |
| Comment by Ethan Zhang (Inactive) [ 22/Jun/21 ] |
|
david.storch Can you point me to an example? I don't know why I was not able to find callers for this in the codebase. |
| Comment by David Storch [ 22/Jun/21 ] |
|
ethan.zhang this is an internal API used by the shell and for communication between nodes in the cluster. It would not have any downstream impact. |
| Comment by Ethan Zhang (Inactive) [ 22/Jun/21 ] |
|
Who are the callers for those methods with flags? Drivers? Modernizing them may have downstream impacts? |