Skip to content

Optimize translog writing by move sync outside writeLock in trimUnreferencedReaders #46201

@dengweisysu

Description

@dengweisysu

In Translog.trimUnreferencedReaders, current.sync() is called inside the writeLock.
current.sync() will take about one seconds as discuss in PR #45450

So take it out of the writeLock can improve the indexing performance as below
1

accumulated time of all index operation: I accumulate the time took by every index operation

the benchmark is done in default config. about performance improve about 8%

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Indexing/EngineAnything around managing Lucene and the Translog in an open shard.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions