Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation errors in AWAITING_NEW_ROW.handleChunk() will always print rowKey=null and not rowKey=chunk.getRowKey #2005

Open
joy91227 opened this issue Nov 8, 2023 · 0 comments
Labels
api: bigtable Issues related to the googleapis/java-bigtable API.

Comments

@joy91227
Copy link

joy91227 commented Nov 8, 2023

rowMerger.push() will call stateMachine.consumeRow() for each chunk. After the completion of each chunk, stateMachine.reset() is called and state is set to AWAITING_NEW_ROW, and rowKey=null.

Since rowKey is null at the start of each AWAITING_NEW_ROW.handleChunk(), when we call Validate at L275, the rowKey that's printed as part of the error message will always be null.

validate(cmp < 0, "AWAITING_NEW_ROW: key must be strictly " + direction);

I think printing the rowKey in the error message is important and can speed up debugging.

For example, I have gotten the error message [1], and knowing the rowKey could help identify what went wrong.

[1]
Error message from worker: java.io.IOException: Failed to advance reader of source: BigtableSource{...}
…redacted………
Caused by: com.google.cloud.bigtable.data.v2.stub.readrows.StateMachine$InvalidInputException: AWAITING_NEW_ROW: key must be strictly increasing. numScannedNotifications: XX, numRowsCommitted:XX, numChunksProcessed: XX, numCellsInRow: 0, numCellsInLastRow: XX, rowKey: null, last5Keys: <these keys are printed correctly, I them redacted for PII concerns>

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API.
Projects
None yet
Development

No branches or pull requests

1 participant