Commits
- Commit:
183a189b6ad23b5e3de955b80cf5e4682ae34bd8
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Date:
httpc: replace ibuf_alloc with xibuf_alloc
There is no check for NULL for a value returned by `ibuf_alloc`,
the NULL will be passed to `memcpy()` if the aforementioned
function will return a NULL. The patch fixes that by replacing
`ibuf_alloc` with macros `xibuf_alloc` that never return NULL.
Found by Svace.
NO_CHANGELOG=codehealth
NO_DOC=codehealth
NO_TEST=codehealth
(cherry picked from commit b4ee146fde6e418aed590ac6054cff75c2a59626)
- Commit:
803a77b2da6aedde7e333a5480f2a66eae623910
- From:
- Astronomax <fgfgfb93@gmail.com>
- Via:
- Serge Petrenko <35663196+sergepetrenko@users.noreply.github.com>
- Date:
limbo: speed up synchronous transaction queue processing
This patch optimizes the process of collecting ACKs from replicas for
synchronous transactions. Before this patch, collecting confirmations
was slow in some cases. There was a possible situation where it was
necessary to go through the entire limbo again every time the next ACK
was received from the replica. This was especially noticeable in the
case of a large number of parallel synchronous requests.
For example, in the 1mops_write bench with parameters --fibers=6000
--ops=1000000 --transaction=1, performance increases by 13-18 times on
small clusters of 2-4 nodes and 2 times on large clusters of 31 nodes.
Closes #9917
NO_DOC=performance improvement
NO_TEST=performance improvement
(cherry picked from commit 4a866f64d64c610a3c8441835fee3d8dda5eca71)
- Commit:
7fa6f1a5a0b48cc7616e72d5b3d8a38b0311b1dc
- From:
- Astronomax <fgfgfb93@gmail.com>
- Via:
- Serge Petrenko <35663196+sergepetrenko@users.noreply.github.com>
- Date:
vclock: introduce `vclock_nth_element` and `vclock_count_ge`
Two new vclock methods have been added: `vclock_nth_element` and
`vclock_count_ge`.
* `vclock_nth_element` takes n and returns whatever element would occur in
nth position if vclock were sorted. This method is very useful for
synchronous replication because it can be used to find out the lsn of the
last confirmed transaction - it's simply the result of calling this
method with argument {vclock_size - replication_synchro_quorum} (provided
that vclock_size >= replication synchro quorum, otherwise it is obvious
that no transaction has yet been confirmed).
* `vclock_count_ge` takes lsn and returns the number of components whose
value is greater than or equal to lsn. This can be useful to understand
how many replicas have already received a transaction with a given lsn.
Part of #9917
NO_CHANGELOG=Will be added in another commit
NO_DOC=internal
(cherry picked from commit 58f3c93b660499e85f08a4f63373040bcae28732)
- Commit:
24d38cef5adff900bea2484235762678ac1c5234
- From:
- Andrey Saranchin <Andrey22102001@gmail.com>
- Via:
- Vladimir Davydov <vdavydov.dev@gmail.com>
- Date:
memtx: do not pass NULL to memcpy when creating gap item in MVCC
According to the C standard, passing `NULL` to `memcpy` is UB, even if
it copies nothing (number of bytes to copy is 0). The commit fixes such
situation in memtx MVCC.
Closes tarantool/security#129
NO_TEST=fix UB
NO_CHANGELOG=fix UB
NO_DOC=fix UB
- Commit:
1f534756d55a314dc0878a6275933627ae657263
- From:
- Andrey Saranchin <Andrey22102001@gmail.com>
- Via:
- Vladimir Davydov <vdavydov@tarantool.org>
- Date:
net_box: fix a crash when a trigger deletes itself
In 6d88274 we rewrote Lua module `internal.trigger` that is used in
`net.box` and possibly some external modules. Old implementation held
all triggers in a Lua table, so deleting a trigger on the fly wasn't a
problem. Now we store all triggers in a list and simply iterate over it
when the triggers are fired, so the trigger list became non-resistent to
modifications on the fly. In order to fix it, let's simply use
`trigger_run` - it is resistant to the list modifications.
Closes #10622
NO_DOC=bugfix
(cherry picked from commit 78cfc5ef4cf43bf9d53dc51d0f843bee350609fd)