Skip to content

Value exceeding AofPageSize is not written to AOF but still cached #1770

@rdavisunr

Description

@rdavisunr

Describe the bug

When attempting to set a value larger than the configured AofPageSize with EnableAOF set to true, the Set operation throws an exception: Tsavorite.core.TsavoriteException: Entry does not fit on page

After the exception is thrown, the client connection is closed and the value is not written to the AOF.

However, despite the rejected AOF write, subsequent GET operations for the key return the value successfully, resulting in a state where the in‑memory cache and the AOF are inconsistent.

Steps to reproduce the bug

  1. Start Garnet v1.1.6 with the following configuration:
{
    "EnableAOF": true,
    "Recover": true
}
  1. Set a value that exceeds the default AofPageSize of 4MB.
  2. Observe that the Set fails with: Tsavorite.core.TsavoriteException: Entry does not fit on page
  3. Reconnect client and attempt to retrieve the key of the value that exceeded AofPageSize

Result
The entry is retrieved successfully.
The entry is not present in the AOF.

Expected behavior

AOF and memory cache are consistent when an entry exceeds AofPageSize

Screenshots

No response

Release version

v1.1.6

IDE

No response

OS version

Windows Server 2025

Additional context

Noticed after testing the fix for #1749 (the sample program from that issue can be used to reproduce this issue).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions