Skip to content

[BUG] [CRITICAL] Missing offset in checkpoint store #46752

@kamil-di

Description

@kamil-di

Describe the bug
After updating azure-sdk-bom to 1.2.38 offset is not stored anymore in Azure Blob Storage.
This is not only breaking our monitoring but also partition switch is currently broken.

To Reproduce
Steps to reproduce the behavior:
Use azure-sdk-bom 1.2.38.
Observe offset is not stored anymore.

Code Snippet
This is caused by offsetString is not used in every place:

com.azure.messaging.eventhubs.models.EventContext#updateCheckpointAsync:
    public Mono<Void> updateCheckpointAsync() {
        if (eventData == null) {
            return Mono.empty();
        }
        Checkpoint checkpoint
            = new Checkpoint().setFullyQualifiedNamespace(partitionContext.getFullyQualifiedNamespace())
                .setEventHubName(partitionContext.getEventHubName())
                .setConsumerGroup(partitionContext.getConsumerGroup())
                .setPartitionId(partitionContext.getPartitionId())
                .setSequenceNumber(eventData.getSequenceNumber())
                .setOffset(eventData.getOffset());
        return this.checkpointStore.updateCheckpoint(checkpoint);
    }

But there should be a fallback in com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore#updateCheckpoint to use getOffset() when getOffsetString() returns null or empty until getOffset() is removed.

Expected behavior
offset is saved in Checkpoint store.

Screenshots
Image

Setup (please complete the following information):

  • Library/Libraries:
  • azure-sdk-bom:1.2.38
  • com.azure:azure-messaging-eventhubs-checkpointstore-blob:jar:1.21.0
  • com.azure:azure-messaging-eventhubs:jar:5.21.0
  • Java version: 21

Severity
This is a high critical defect, because it breaks partition switch and our grafana monitoring - we can't monitor consumer group lag.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Event HubsService AttentionWorkflow: This issue is responsible by Azure service team.Type-BugbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions