Skip to content

[event-hubs] Better error handling and reporting#6465

Merged
richardpark-msft merged 9 commits into
Azure:masterfrom
richardpark-msft:richardpark-eh-ga-errorhandling
Dec 10, 2019
Merged

[event-hubs] Better error handling and reporting#6465
richardpark-msft merged 9 commits into
Azure:masterfrom
richardpark-msft:richardpark-eh-ga-errorhandling

Conversation

@richardpark-msft
Copy link
Copy Markdown
Member

Changes to error handling and reporting due to feature team discussion.

  • If the user's event handlers (processEvents, processInitialization,
    processClose) throw errors we funnel those into their processError()
    handler so they'll know about it.
  • BlobCheckpointStore shouldn't eat all errors when claiming partitions.
    Now, the only case where it will eat errors is when we have an etag
    conflict due to someone else taking partition ownership.

Fixes #6444

* claimOwnership() errors during load balancing are routed to the user's processError handler
* claimOwnership() errors when stopping are thrown

Also:
* Fixing a bug where we weren't awaiting when abandoning partitions.
* Moving the abandonPartitions to the end, rather than the beginning of stop()
* Also updating dep info for eventhubs-checkpointstore-blob which won't work properly if ran against an older eventhubs package.
* processError() errors are logged, but ignored
@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run js - eventhubs-client - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread sdk/eventhub/event-hubs/src/eventProcessor.ts
…dn't claim any.

Prior to this change we couldn't tell the difference between "storage is failing for some reason" and "we're just losing to other processors that are attempting to claim partitions".

Now an empty list of ownerships is okay and just indicates that we should do nothing this time around.
@richardpark-msft
Copy link
Copy Markdown
Member Author

/azp run js - eventhubs-client - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@chradek chradek left a comment

Choose a reason for hiding this comment

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

Latest changes look good to me. I see there's still one flaky test but I wouldn't let it block since we already have an issue tracking it.

@richardpark-msft richardpark-msft merged commit 3a81099 into Azure:master Dec 10, 2019
@richardpark-msft richardpark-msft deleted the richardpark-eh-ga-errorhandling branch December 10, 2019 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[event-hubs] Error handling changes for SDK consistency

2 participants