-
Notifications
You must be signed in to change notification settings - Fork 156
Event offset not correctly assigned in ProcessorPartitionClient::UpdateCheckpoint() #6821
Copy link
Copy link
Open
Open
Copy link
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Event HubsService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.Event HubsService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
When updaing the checkpoint store with an event from a given eventhub, the function UpdateCheckpoint() in class Azure::Messaging::EventHubs::ProcessorPartitionClient does not correctly extract the offset from this event, which leads to null offset in the checkpoint store as reported in this issue. Unfortunately this bug still exists in the main branch.
Current implementation in file: https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/eventhubs/azure-messaging-eventhubs/src/processor_partition_client.cpp (line 77-81):
std::string offset{};if (!eventData->Offset.HasValue()){offset = eventData->Offset.Value();}Expected implementation:
std::string offset{};if (eventData->Offset.HasValue()){offset = eventData->Offset.Value();}else {throw std::runtime_error("Event does not have an offset.");}