Commit bf8ddf3
fix: classify leader-change errors during connect()
connect() called handshake()/open_database() directly, bypassing
_run_protocol's leader-error classification. A NOT_LEADER (10250) or
LEADERSHIP_LOST (10506) response on OPEN surfaced as a generic
OperationalError — indistinguishable from a SQL error — and the caller
lost the signal to re-resolve the leader.
Re-raise leader-coded OperationalError as DqliteConnectionError with
the original chained as __cause__, so retry layers and cluster failover
treat it as a transport issue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e4beb34 commit bf8ddf3
2 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
730 | 761 | | |
731 | 762 | | |
732 | 763 | | |
| |||
0 commit comments