You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Pereslegin (Jira)" <ji...@apache.org> on 2024/08/12 10:36:00 UTC

[jira] [Updated] (IGNITE-22975) Catalog compaction. Improve minimum tx begin time computation

     [ https://issues.apache.org/jira/browse/IGNITE-22975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Pereslegin updated IGNITE-22975:
--------------------------------------
    Ignite Flags:   (was: Docs Required,Release Notes Required)

> Catalog compaction. Improve minimum tx begin time 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)