Skip to content

Commit 90cacb2

Browse files
chore: make sure to include the new row key in row merging errors (#2046)
* chore: make sure to include the new row key in row merging errors Change-Id: Ieebc425d359a426d24c1ed69d0093e97635bd742 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 55d1fb9 commit 90cacb2

File tree

1 file changed

+4
-0
lines changed
  • google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows

1 file changed

+4
-0
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/StateMachine.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ State handleLastScannedRow(ByteString rowKey) {
277277

278278
@Override
279279
State handleChunk(CellChunk chunk) {
280+
// Make sure to populate the rowKey before validations so that validation failures include
281+
// the new key
282+
rowKey = chunk.getRowKey();
283+
280284
validate(!chunk.getResetRow(), "AWAITING_NEW_ROW: can't reset");
281285
validate(!chunk.getRowKey().isEmpty(), "AWAITING_NEW_ROW: rowKey missing");
282286
validate(chunk.hasFamilyName(), "AWAITING_NEW_ROW: family missing");

0 commit comments

Comments
 (0)