[SERVER-54878] Compact can log incorrect value for freedBytes Created: 02/Mar/21 Updated: 23/Jan/24 Resolved: 05/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0, 4.4.4 |
| Fix Version/s: | 4.4.7, 5.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bruce Lucas (Inactive) | Assignee: | Gregory Wlodarek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | newgrad | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Execution Team 2021-05-17 | ||||
| Participants: | |||||
| Case: | (copied to CRM) | ||||
| Description |
|
When compacting a collection that is actively being written it is possible that the collection is larger at the completion of compaction than when it started; I assume that this is an expected outcome. In this case the operation returns a negative number for bytesFreed:
Whereas an absurdly large value is logged for freedBytes:
It looks like compactCollection is incorrectly treating the negative signed value as unsigned when it logs it. Possibly both values should be logged as 0, since logging a negative value may make it appear that compact is malfunctioning. Also, it would be good to make the command result and the log statement consistent; suggest changing the log statement to use "bytesFreed" as it seems less likely that users will be affected by changing the log statement than by changing the command return. |
| Comments |
| Comment by Githook User [ 10/May/21 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit c48ddf533938bc4ae85ae120b63c1de0ee290e26) |
| Comment by Githook User [ 05/May/21 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |