I am creating a disk store in Geode using the code below, where the maximum size of 100MB is used to limit the size of the disk store:
int diskMaxSize = 100;
DiskStoreFactory factory = cache.createDiskStoreFactory();
// Set up disk store properties here.
if(!StringUtils.isEmpty(diskLoc) && diskMaxSize > 0) {
factory.setDiskDirsAndSizes(new File[] {new File(diskLoc)}, new int[] {diskMaxSize});
}
diskStore = factory.create(name == null ? DiskStoreFactory.DEFAULT_DISK_STORE_NAME : name);
Everything seems to work and the disk store is created. However, I noticed that under load, the overflow files get created even after the 100MB limit is reached in the disk store directory. The Geode documentation states that dir-size is:
An optional dir-size attribute specifying the maximum amount of space, in megabytes, to use for the disk store in the directory. By default, there is no limit. The space used is calculated as the combined sizes of all oplog files.
Why do the overflow files continue to get created even after 100MB of disk space has been taken up?
Answer provided by @Zak in the comments:
I had auto-compaction enabled, and the documentation states that dir-size is ignored.