Skip to content

Conversation

@pakrym
Copy link
Contributor

@pakrym pakrym commented Jan 21, 2021

A prototype to reduce the amount of requests we make to get checkpoints.

@pakrym pakrym requested a review from jsquire January 21, 2021 22:09
@ghost ghost added the Event Hubs label Jan 21, 2021
Copy link
Member

@jsquire jsquire left a 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.

/// starting location set.
/// </remarks>
///
protected abstract Task<IEnumerable<EventProcessorCheckpoint>> ListCheckpointsAsync(CancellationToken cancellationToken);
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@pakrym pakrym marked this pull request as ready for review January 22, 2021 23:51
@pakrym
Copy link
Contributor Author

pakrym commented Jan 22, 2021

Ported all tests from ListCheckpoint

}

/// <summary>
/// Indicates that an unhandled exception was encountered while retrieving a list of checkpoints.
Copy link
Member

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.
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

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

Missing docs

@pakrym pakrym merged commit a70eb1a into Azure:master Jan 25, 2021
@pakrym pakrym deleted the pakrym/Retreive-checkpoints-one-by-one branch January 25, 2021 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants