-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Block Manager, Checkpoints, Reconciliation
-
None
-
Storage Engines
-
8
-
2024-08-06 - Withholding Tax, StorEng - 2024-09-17, 2024-09-03 Q3 Streams v1, StorEng - 2024-10-01, StorEng - 2024-10-15, StorEng - 2024-10-29, StorEng - 2024-11-12
Even after the collection is completely empty due a TTL index the disk space is not released to the OS.
Following the steps for the repro tested on 8.0.0-rc13 and MacOS 14.5:
// start single node replica set // mlaunch init --replicaset --node 1 function makeid(length) { let result = ''; const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const charactersLength = characters.length; let counter = 0; while (counter < length) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); counter += 1; } return result; } // generate random string let r = makeid(5000) for(i=0;i<20000;i++){db.foo.insertOne({r:r, a:ISODate('2023-07-29T11:17:56.215Z')})} db.foo.aggregate([{$limit: 20000},{$set: {range: {$range: [0,100]}}},{$unwind: "$range"},{$project: {_id:0, range:0}},{$merge: "foo"}]) // replset [direct: primary] test> db.foo.stats(1024*1024).storageSize // 10458.5703125 // create ttl index db.foo.createIndex({a:1},{expireAfterSeconds: 3600 }) // replset [direct: primary] test> db.foo.stats(1024*1024).indexSizes // { _id_: 145.9453125, a_1: 77.34765625 } // replset [direct: primary] test> db.foo.stats(1024*1024).storageSize // 16110.84375
- is related to
-
WT-13341 db storage size not reducing after range deletion
- Open