-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Retrieve checkpoints one by one #18127
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
Retrieve checkpoints one by one #18127
Conversation
jsquire
left a comment
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.
Looks solid. I don't see anything functional for feedback, mostly just formatting nits and doc thoughts.
You're welcome to ignore the formatting/docs feedback to advance this. I left it as much as notes for myself; I'm happy to loop back around after this closes out and do the pedantic nit-picky things.
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/BlobCheckpointStore/BlobsCheckpointStore.cs
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/BlobCheckpointStore/BlobsCheckpointStore.cs
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/BlobCheckpointStore/BlobsCheckpointStore.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/BlobCheckpointStore/BlobsCheckpointStore.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs
Show resolved
Hide resolved
| /// starting location set. | ||
| /// </remarks> | ||
| /// | ||
| protected abstract Task<IEnumerable<EventProcessorCheckpoint>> ListCheckpointsAsync(CancellationToken cancellationToken); |
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.
Do we want to tag this as [EditorBrowsable(false)] and possibly be a bit stronger and point them at GetCheckpointAsync in the <remarks> and potentially an [Obsolete] ?
The interplay between the pure abstract here and the virtual for GetCheckpointAsync may make this tricky.... it may be that non-browsable with a remark is the best we can do.... thoughts?
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.
[EditorBrowsable(false)] won't help, whoever inherits from EventProcessor would need to implement this method. I would also not rush to obsolete it because that would cause a compiler error for people with WarnAsError and we might realize we need ListCheckpointsAsync in some scenarios.
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.
Added a remark that overriding both is recommended.
sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor.cs
Outdated
Show resolved
Hide resolved
|
Ported all tests from ListCheckpoint |
| } | ||
|
|
||
| /// <summary> | ||
| /// Indicates that an unhandled exception was encountered while retrieving a list of checkpoints. |
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.
Is this retrieving a list or a single checkpoint?
| } | ||
|
|
||
| /// <summary> | ||
| /// Indicates that an attempt to retrieve a list of checkpoints has completed. |
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.
Isn't this a single checkpoint?
| /// event processor instance, so that processing for a given partition can be properly initialized. | ||
| /// </summary> | ||
| /// | ||
| /// <param name="partitionId"></param> |
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.
Missing docs
sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs/src/Primitives/EventProcessor.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Azure.Messaging.EventHubs.Shared/src/Processor/StorageManager.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Squire <[email protected]>
A prototype to reduce the amount of requests we make to get checkpoints.