Commit 3ceec3b
[SPARK-44835][CONNECT] Make INVALID_CURSOR.DISCONNECTED a retriable error
### What changes were proposed in this pull request?
Make INVALID_CURSOR.DISCONNECTED a retriable error.
### Why are the changes needed?
This error can happen if two RPCs are racing to reattach to the query, and the client is still using the losing one. SPARK-44833 was a bug that exposed such a situation. That was fixed, but to be more robust, we can make this error retryable.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Tests will be added in #42560
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #42818 from juliuszsompolski/SPARK-44835.
Authored-by: Juliusz Sompolski <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit f13743d)
Signed-off-by: Hyukjin Kwon <[email protected]>1 parent a9d601c commit 3ceec3b
File tree
2 files changed
+44
-4
lines changed- connector/connect/common/src/main/scala/org/apache/spark/sql/connect/client
- python/pyspark/sql/connect/client
2 files changed
+44
-4
lines changedconnector/connect/common/src/main/scala/org/apache/spark/sql/connect/client/GrpcRetryHandler.scala
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
221 | 236 | | |
222 | 237 | | |
223 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
590 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
591 | 604 | | |
592 | 605 | | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
593 | 618 | | |
594 | 619 | | |
595 | 620 | | |
| |||
0 commit comments