[
https://issues.apache.org/jira/browse/IGNITE-22975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Pereslegin updated IGNITE-22975:
--------------------------------------
Summary: Catalog compaction. Improve minimum tx begin time local
computation (was: Catalog compaction. Improve minimum tx begin time
computation)
> Catalog compaction. Improve minimum tx begin time local computation
> -------------------------------------------------------------------
>
> Key: IGNITE-22975
> URL: https://issues.apache.org/jira/browse/IGNITE-22975
> Project: Ignite
> Issue Type: Improvement
> Reporter: Pavel Pereslegin
> Priority: Major
>
> Currently minimum begin time among all transactions started locally computes
> under write lock.
> {code:java}
> @Override
> public HybridTimestamp minimumBeginTime(Supplier<HybridTimestamp>
> defaultBeginTime) {
> readWriteLock.writeLock().lock();
> try {
> return txCatalogVersionByBeginTxTs.keySet().stream()
> .min(HybridTimestamp::compareTo)
> .orElse(defaultBeginTime.get());
> } finally {
> readWriteLock.writeLock().unlock();
> }
> }
> {code}
> This code blocks the start of transactions and can be optimized.
> Need to investigate possible ways to optimize it.
> * may be we can somehow use existing ordered map {{txCountByCatalogVersion}}
> to provide minimum require catalog version instead of tx begin time and
> rework/remove {{ActiveLocalTxMinimumBeginTimeProvider}}.
> * may be we can ignore defaultBeginTime supplier and not update this
> timestamp when there are no active RW transactions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)