{183728233}: Add Lua push write - #6027
Conversation
1fe3177 to
d7dd67d
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: 4/679 tests failed ⚠.
The first 10 failing tests are:
queuedb_rollover_noroll1_generated **quarantined**
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
fdb_compat
sc_downgrade [timeout] **quarantined**
d7dd67d to
2372267
Compare
2372267 to
ea9dda9
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
fdb_compat
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
sc_timepart [timeout] **quarantined**
ea9dda9 to
5bcbc89
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
sp_snapshot_generated
sc_parallel_logicalsc_generated
consumer_non_atomic_default_consumer_generated **quarantined**
fdb_push_lua
fdb_compat
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
fdb_push_lua
manual_partition
fdb_compat
sc_downgrade [timeout] **quarantined**
28f01d5 to
ec68fcd
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
ec68fcd to
6c09249
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_redo [failed with core dumped]
sc_resume_logicalsc_generated **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
fdb_compat
sc_downgrade [timeout] **quarantined**
6c09249 to
4c0f998
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.
df2c0cb to
f69789d
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sqllogfill_reset_gen
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
5c0ffe8 to
8b6b1f1
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
manual_partition
ssl_set_cmd
ssl_prefer
ssl_dbname
skipscan **quarantined**
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
8b6b1f1 to
b7b83f0
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
commit_lsn_map
sc_downgrade [timeout] **quarantined**
b7b83f0 to
e9f9670
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
| fdb_push_connector_t *push = sp->clnt->fdb_push; | ||
| int nparams = sqlite3_bind_parameter_count(stmt); | ||
| if (nparams > 0) { | ||
| fdb_push_set_params(push, calloc(nparams, sizeof(struct param_data))); |
There was a problem hiding this comment.
check calloc return for NULL
dorinhogea
left a comment
There was a problem hiding this comment.
please see comments, thank you
| if (!clnt->in_client_trans) { | ||
| goto free; | ||
| } |
There was a problem hiding this comment.
Follow-up (perf, non-blocking): SP push writes reconnect on every exec.
When the SP is not in an outer transaction (!clnt->in_client_trans), each push write closes its remote connection right after running (fdb_free_tran, db/fdb_push.c:820).
So this loop reconnects every time:
local stmt = db:prepare("INSERT INTO LOCAL_remdb.t VALUES (?, ?)")
for i = 1, 10000 do
stmt:bind(1, i); stmt:bind(2, 'row'..i); stmt:exec() -- reconnects each time
endGotcha: db:begin() inside the SP does not help. It doesn't set in_client_trans. Only an outer client transaction reuses the handle:
begin
exec procedure ...
commit
Fix: keep the remote connection open across execs in one SP call. Free it once at SP teardown (reset_sp). Gate it so it never double-frees a dtran owned by an outer transaction. Semantics stay the same — each write is already auto-committed remotely. We just skip the reconnect.
There was a problem hiding this comment.
We could consider this later; I would say, since remote info is cached (fdb and sockets), cost should be low.
| if (p->nparams && p->params) | ||
| dohsql_free_params(&p->nparams, &p->params, | ||
| p->nparams-1); |
There was a problem hiding this comment.
why did we pass p->nparams-1? If the number of params is 1 does it mean we don't free anything?
There was a problem hiding this comment.
we decide to address this in a future PR
1dc1952 to
c537a5a
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
reco-ddlk-sql **quarantined**
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
c537a5a to
659d12e
Compare
Signed-off-by: Emelia Lei <wlei29@bloomberg.net>
659d12e to
5d7db6f
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
No description provided.