Commit b50c092
authored
fix: check for empty before delete (#4047)
spanner IT fails for `deleteAllById_doesNothingOnEmptyIds` test with error from Spanner:
`INVALID_ARGUMENT: Failed to initialize transaction due to invalid mutation key.`
**Trigger of this behavior change:**
spanner activated multiplexed sessions by default in [googleapis/java-spanner#3996](googleapis/java-spanner#3996), which triggers this error.
When issuing a write() with a Mutation that has an empty KeySet produces an exception in Multiplexed clients (see [pr](googleapis/java-spanner#4023)), but does a no-op in non-multiplexed ones. Unlike Regular session, multiplex session needs a valid mutation to generate a precommit token.
Fixes #40461 parent 092a1dd commit b50c092
1 file changed
Lines changed: 3 additions & 0 deletions
File tree
- spring-cloud-gcp-data-spanner/src/main/java/com/google/cloud/spring/data/spanner/repository/support
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
0 commit comments