{94886844} feat: add with_effects to db_commit#5715
{94886844} feat: add with_effects to db_commit#5715emelialei88 merged 1 commit intobloomberg:mainfrom
Conversation
b087504 to
adb6aa2
Compare
| ($0=x'00112233445566778899001122334455667788990011223344556677889900112233445566778899') | ||
| (version='1') | ||
| (rows inserted=1) | ||
| Testing db:commit with with_effects |
There was a problem hiding this comment.
Add a test which does all operations in a single transaction as well? Also test for num_selected, num_affected.
|
/runtests |
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
truncatesc_offline_generated [core dumped]
insert_lots
sp_twofiles_generated
sp_queueodh_generated
sp_snapshot_generated
sp
consumer_non_atomic_default_consumer_generated
sc_transactional_rowlocks_generated
pmux_sqlite_file_generated
insert_lots_ssl_generated
|
Also need to update docs - https://bloomberg.github.io/comdb2/storedprocs.html#dbcommit (and then on Tutti as well) |
8fa1442 to
81e7ab2
Compare
Signed-off-by: Emelia Lei <wlei29@bloomberg.net>
81e7ab2 to
0b49053
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sp_snapshot_generated
consumer_non_atomic_default_consumer_generated
sc_transactional_rowlocks_generated
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
reco-ddlk-sql
consumer_non_atomic_default_consumer_generated
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: 0/0 tests failed ⚠.
Extends the Lua stored procedure
db:commit()API to optionally return transaction effects (row-change counts) after a successful commit.db:commit()now accepts an optional Lua table parameter with a single boolean fieldwith_effects. When called asrc, effects = db:commit({ with_effects = true }), it returns the usual result code plus an effects Lua table matching the structcdb2_effects_type. Default behavior remains unchanged when the option is not provided.