Repository navigation
Conversation
Contributor
Author
|
/gemini review |
Contributor
There was a problem hiding this comment.
📋 Review Summary
This PR resolves transient ForbiddenException rate-limit failures during test teardown in BigQueryMetastoreCatalogIT by adding a retry mechanism with linear backoff in catalogCleanup. The implementation is clean, properly handles thread interrupts, and gives BigQuery's 10-second per-table metadata operation quota window sufficient time to reset.
🔍 General Feedback
- Because
super.catalogCleanup(namespaces)iterates overcatalog.listTables(namespace)and drops each table before dropping the namespace, retryingsuper.catalogCleanupis safe when adropTablecall hits a rate limit (already-dropped tables will no longer be returned bylistTableson subsequent attempts).
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes transient
org.apache.iceberg.exceptions.ForbiddenException: Exceeded rate limits: too many table update operations for this tablefailures inBigQueryMetastoreCatalogITduringIcebergIO Integration Tests(e.g., https://github.com/apache/beam/actions/runs/43154192604).Root Cause
BigQuery enforces a per-table metadata update quota of 5 table operations per 10 seconds (
rateLimitExceeded: Exceeded rate limits: too many table update operations for this table, surfaced byBigQueryMetastoreCatalogasorg.apache.iceberg.exceptions.ForbiddenException). When a multi-snapshot test such astestStreamingCdcReadMixedDeleteAndOverwriteSnapshotscreates a table and commits 4 snapshots (5 table operations) and completes its DirectRunner pipeline within 10 seconds (9.7s in run43154192604), the 6th table operation (catalog.dropTable(identifier)incatalogCleanup) hits the 10-second rate limit window.Fix
Override
catalogCleanup(List<Namespace>)inBigQueryMetastoreCatalogITto retrysuper.catalogCleanup(namespaces)up to 3 times with a 5s backoff whenForbiddenExceptionis thrown, allowing the 10-second per-table rate limit window to clear before dropping the table and namespace.Verification
IcebergIO Integration Testson this branch: https://github.com/apache/beam/actions/runs/43166035024