Apache Geode CHANGELOG

Disk Store Operation Logs

At creation, each operation log is initialized at the disk store’s max-oplog-size, with the size divided between the crf and drf files. When the oplog is closed, Apache Geode shrinks the files to the space used in each file.

After the oplog is closed, Geode also attempts to create a krf file, which contains the key names as well as the offset for the value within the crf file. Although this file is not required for startup, if it is available, it will improve startup performance by allowing Geode to load the entry values in the background after the entry keys are loaded.

When an operation log is full, Geode automatically closes it and creates a new log with the next sequence number. This is called oplog rolling. You can also request an oplog rolling through the API call DiskStore.forceRoll. You may want to do this immediately before compacting your disk stores, so the latest oplog is available for compaction.

Note: Log compaction can change the names of the disk store files. File number sequencing is usually altered, with some existing logs removed or replaced by newer logs with higher numbering. Geode always starts a new log at a number higher than any existing number.

This example listing shows the logs in a system with only one disk directory specified for the store. The first log (BACKUPCacheOverflow_1.crf and BACKUPCacheOverflow_1.drf) has been closed and the system is writing to the second log.

bash-2.05$ ls -tlra 
total 55180
drwxrwxr-x   7 person users        512 Mar 22 13:56 ..
-rw-rw-r--   1 person users          0 Mar 22 13:57 BACKUPCacheOverflow_2.drf
-rw-rw-r--   1 person users     426549 Mar 22 13:57 BACKUPCacheOverflow_2.crf
-rw-rw-r--   1 person users          0 Mar 22 13:57 BACKUPCacheOverflow_1.drf
-rw-rw-r--   1 person users     936558 Mar 22 13:57 BACKUPCacheOverflow_1.crf
-rw-rw-r--   1 person users       1924 Mar 22 13:57 BACKUPCacheOverflow.if
drwxrwxr-x   2 person users       2560 Mar 22 13:57 .

The system rotates through all available disk directories to write its logs. The next log is always started in a directory that has not reached its configured capacity, if one exists.

When Disk Store Oplogs Reach the Configured Disk Capacity

If no directory exists that is within its capacity limits, how Geode handles this depends on whether automatic compaction is enabled.

  • If auto-compaction is enabled, Geode creates a new oplog in one of the directories, going over the limit, and logs a warning that reports:

    Even though the configured directory size limit has been exceeded a 
    new oplog will be created. The current limit is of XXX. The current 
    space used in the directory is YYY.

    Note: When auto-compaction is enabled, dir-size does not limit how much disk space is used. Geode will perform auto-compaction, which should free space, but the system may go over the configured disk limits.

  • If auto-compaction is disabled, Geode does not create a new oplog, operations in the regions attached to the disk store block, and Geode logs this error:

    Disk is full and rolling is disabled. No space can be created