Fix 0 rows in set on INSERT ... SELECT#79462
Conversation
|
Oh, client requires |
|
Maybe try this? |
|
It's pointless to use |
0 rows in set on INSERT SELECT
|
Workflow [PR], commit [43c1ad5] Summary: ❌
|
|
Since I changed all the lines in this PR, maybe we need one more review. @CheSema, could you help? |
src/Client/ClientBase.cpp
Outdated
|
|
||
| void ClientBase::onProgress(const Progress & value) | ||
| { | ||
| processed_rows += value.written_rows; |
There was a problem hiding this comment.
ClientBase::processed_rows counts read OR written bytes which client knows. Usually client accounts inserted and selected rows. But indeed client does not see stats from insert-select query.
Progress packet is optional. Server does not obligated to send it. But that packet is allowed to be send on insert and select queries. I suspect in that case you would double count.
Also server could send several packages with progress and it contains absolute nubmers, in that case you would count a square.
But this all have to be validated. I might be wrong here.
0 rows in set on INSERT SELECT0 rows in set on INSERT ... SELECT
rienath
left a comment
There was a problem hiding this comment.
@CheSema I have separated the processed_rows into block and progress tracking to prevent double counting scenario that you described. I don't think the square scenario is possible because sendProgress() calls fetchValuesAndResetPiecewiseAtomically() that does res.read_rows = read_rows.fetch_and(0), which 0s out values every time it sends progress report. So we send deltas, not absolute values. Could you please take a look when you have time?
660e610
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
0 rows in setappearance afterINSERT INTO ... SELECTquery. Closes #47800