Commit 367ff74
committed
refactor: move column cache reset from setNewConnection to tryConnect
The reset belongs in tryConnect() because that is the earliest point where
we have a new connection but have not yet issued any system table queries.
By the time setNewConnection() is called, tryConnect() has already reset
the caches and populated them via refreshNodeListAndTokenMap() — so resetting
in setNewConnection() was discarding freshly-discovered, correct, warm caches
and forcing an unnecessary extra SELECT * on the next query.
Both connect() and backgroundReconnect() go through tryConnect() before
setNewConnection(), so a single reset in tryConnect() covers both flows.1 parent db67e8a commit 367ff74
1 file changed
Lines changed: 3 additions & 8 deletions
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | 343 | | |
349 | 344 | | |
350 | 345 | | |
| |||
438 | 433 | | |
439 | 434 | | |
440 | 435 | | |
441 | | - | |
442 | | - | |
443 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
444 | 439 | | |
445 | 440 | | |
446 | 441 | | |
| |||
0 commit comments