Commit 5ac50f7
committed
copy: fix vectorized auto commit behavior
When we implemented the vectorized INSERT which supports COPY in some
cases, we missed one condition for auto-committing the txn that is
present in the regular `tableWriterBase` path. Namely, we need to check
whether the deadline that might be set on the txn hasn't expired yet,
and if it has, we shouldn't be auto-committing and should be leaving it
up to the connExecutor (which will try to refresh the deadline). The
impact of the bug is that often if COPY took longer than 40s (controlled
via `server.sqlliveness.ttl`), we'd hit the txn retry error and
propagate it to the client.
Release note (bug fix): Previously, the "atomic" COPY command
(controlled via `copy_from_atomic_enabled`, which is `true` by default)
could encounter RETRY_COMMIT_DEADLINE_EXCEEDED txn errors if the whole
command took 1 minute or more. This was the case only when the
vectorized engine was used for COPY and is now fixed.1 parent 133c00b commit 5ac50f7
2 files changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 151 | + | |
161 | 152 | | |
162 | 153 | | |
163 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
194 | 200 | | |
195 | | - | |
| 201 | + | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
| |||
0 commit comments