[SERVER-58508] The "dataSize" command does not calculate/include the records matching specified bounds Created: 14/Jul/21 Updated: 21/Jul/21 Resolved: 21/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Petr Novak | Assignee: | Edwin Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
I tried to use https://docs.mongodb.com/manual/reference/command/dataSize/#mongodb-dbcommand-dbcmd.dataSize command to obtain exact size of database records mathing the specified key-range, like:
|
| Comments |
| Comment by Edwin Zhou [ 21/Jul/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for your report. Please note that the SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to be a bug, I will now close it. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Developer Community Forums. If your investigation with our Community Forums leads you to believe you've hit a bug, let us know and we will be happy to reopen this ticket and further investigate! Best, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Petr Novak [ 14/Jul/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I apologize, I mistakenly submitted an unfinished description of the issue and there is no possibility to edit the description, so I will add the rest to the comment.
The MongoDB buid info:
So, from my point of view, the command example above, should return size of the one record, matching the _id, but the result is:
I´m pretty surre that the record exists:
So it seems that the range bounder values are excluded from the selection. Yes, this example is pretty useless, but it was used for simple demonstration of the bug. My real usecase for the command is following:
So there is no option, how to calculate the size of records matching exact one specific value of the specified KEY field.
|