Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ObjectStoreOutputFlags to GarnetObjectStoreOutput #923

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

TalZaccai
Copy link
Contributor

@TalZaccai TalZaccai commented Jan 18, 2025

This change is to avoid checking for GarnetObjectStoreOutput.spanByteAndMemory.Length == 0 in order to determine if object operation was attempted on a mismatched type (and by that to allow object operations to return an empty output and avoid unnecessary allocations)

Benchmarks for module operations after the change:
Note: # of allocated bytes decreased for ObjRmw, ObjRead & JsonSet.

Method Params Mean Error StdDev Median Gen0 Allocated
ModuleNoOpRawStringReadCommand None 55.37 us 1.969 us 5.422 us 53.53 us - -
ModuleNoOpRawStringRmwCommand None 63.87 us 1.275 us 3.031 us 63.01 us - -
ModuleNoOpObjRmwCommand None 89.03 us 1.994 us 5.786 us 87.00 us - 3200 B
ModuleNoOpObjReadCommand None 73.87 us 1.469 us 2.794 us 73.74 us - 3200 B
ModuleNoOpProc None 45.70 us 0.889 us 1.092 us 45.64 us - -
ModuleNoOpTxn None 38.86 us 0.760 us 1.519 us 38.79 us - -
ModuleJsonGetCommand None 154.14 us 2.852 us 4.765 us 153.92 us - 72800 B
ModuleJsonSetCommand None 269.16 us 5.345 us 13.312 us 268.49 us 0.4883 223200 B

@TalZaccai TalZaccai changed the title Adding wrongType bool to GarnetObjectStoreOutput Adding ObjectStoreOutputFlags to GarnetObjectStoreOutput Jan 21, 2025
@TalZaccai TalZaccai requested a review from badrishc January 21, 2025 19:37
/// <returns></returns>
bool Operate(ref ObjectInput input, ref SpanByteAndMemory output, out long sizeChange, out bool removeKey);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reinstate sizeChange as discussed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SizeChange was added to GarnetObjectStoreOutput

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GOSO fields should be limited to what information needs to flow from the back-end to the front-end. Let us make sure we verify this holds for all additions to GOSO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants