-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add Memory Stream Provider #2063
Conversation
…g-and-Removing-stream-providers # Conflicts: # src/OrleansRuntime/Core/ManagementGrain.cs
…yStreamProvider
…yStreamProvider
…yStreamProvider
Hi @JingqiaoFu, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! TTYL, DNFBOT; |
Is it mimicking Azure Queue provider or Event Hub? Grain per queue? |
{ | ||
public interface IMemoryStreamQueueGrain : IGrainWithGuidKey | ||
{ | ||
Task SetMaxEventCount(int maxEventCount); |
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.
who calls SetMaxEventCount?
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.
This is supposed to be a helper function for users that limits the size of the queue. It doesn't have to be called during the provider's life cycle.
I am not sure you if you meant that you addressed my feedback. It does not appear so. In particular, I mean my main feedback about a different design that will build an in memory emulation of AQ or EH, and not the full new adapter. |
Gaby: Sorry about the confusion, the fixes I made was for the internal codeflow feedback. |
I did not realize @JingqiaoFu is on the core team, I thought he needs my feedback. |
int providerNameGuidHash = (int)jenkinsHash.ComputeHash(providerName); | ||
|
||
// get queueId hash code | ||
uint queueIdHash = queueId.GetUniformHashCode(); |
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.
in order to trust this uniform hash code, please remove the overloads for QueueId.GetQueueId
that do not take an explicit hash. The currently have no usages, so it's an easy removal, but will prevent naive usages in the future.
} | ||
catch (Exception exc) | ||
{ | ||
throw; |
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.
if this catch is just throwing, why are you catching in the first place? Didn't you forget a log call here?
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.
Yes, there should be an error logging call. Will add that.
… QueueId.GetUniformHashCode(). Added Error logging in MemoryAdapterReceiver.GetQueueMessagesAsync
Add Memory Stream Provider, Would you mind squashing the commits for me? Thanks.