[SERVER-73867] Improve logging at compact end Created: 10/Feb/23 Updated: 29/Oct/23 Resolved: 28/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Yujin Kang Park | Assignee: | Yujin Kang Park |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Storage Execution
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Execution Team 2023-03-06 |
| Participants: |
| Description |
|
On finalizing a collection (and indices) compact call, the amount of freed space is logged here. It is possible for compact to actually cause the file size to grow instead of shrink, if there is little free space. This is because compacts also cause checkpoints to happen, which need to grow the file. If the compact operation results in no space reduction, and the checkpoint causes the file to grow, we will have a situation where pre-compact size is smaller than post-compact one. Size diff is computed as an unsigned long, so this results in an underflow and a very large number of freed bytes being reported. For instance, this can be observed in all runs of compact.js:
|
| Comments |
| Comment by Githook User [ 28/Feb/23 ] |
|
Author: {'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}Message: |
| Comment by Gregory Noma [ 14/Feb/23 ] |
|
We might want to just report the before/after separately |