-
Notifications
You must be signed in to change notification settings - Fork 521
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
Invoke custom commands from custom proc/txn #597
Open
yrajas
wants to merge
13
commits into
microsoft:main
Choose a base branch
from
yrajas:yrajas/proctocmd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yrajas
force-pushed
the
yrajas/proctocmd
branch
2 times, most recently
from
October 22, 2024 04:36
c1391fc
to
f0450e4
Compare
yrajas
changed the title
[WIP] Invoke custom raw string cmd from custom proc/txn
[WIP] Invoke custom commands from custom proc/txn
Oct 22, 2024
yrajas
changed the title
[WIP] Invoke custom commands from custom proc/txn
Invoke custom commands from custom proc/txn
Oct 22, 2024
yrajas
force-pushed
the
yrajas/proctocmd
branch
from
October 23, 2024 03:11
ba58f56
to
ce69dfe
Compare
badrishc
reviewed
Oct 28, 2024
Moved custom procs, txn to test project.
yrajas
force-pushed
the
yrajas/proctocmd
branch
from
November 1, 2024 01:25
5ed4735
to
3c6b5a9
Compare
badrishc
reviewed
Nov 8, 2024
if (sessionCustomProcMap[id] == null) | ||
{ | ||
var entry = customCommandManager.customProcedureMap[id] ?? throw new GarnetException($"Custom procedure {id} not found"); | ||
sessionCustomProcMap[id] = entry.CustomProcedure(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name this appropriately, as CustomProcedureFactory
badrishc
reviewed
Nov 8, 2024
@@ -769,7 +769,7 @@ bool NetworkCustomProcedure() | |||
return true; | |||
} | |||
|
|||
TryCustomProcedure(currentCustomProcedure.CustomProcedureImpl); | |||
TryCustomProcedure(customCommandManagerSession.GetCustomProcedure(currentCustomProcedure.Id, this)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
every call to this creates a new factory instance? that does not seem efficient at all.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds ability to invoke custom raw string commands and object commands from within custom procedures and transactions.