Skip to content

Retain the IndexShard until Store close #103828

Open
@DiannaHohensee

Description

@DiannaHohensee

I'm trying to think of the code components as a stack of layers, and IndexShard#close() destructs pieces of the stack but not all. The storage layer is still alive, at the bottom of the stack, serving reads, but now we can't get to it through the IndexShard, which is the higher level distributed layer access point.

The IndexShard#close method resets the Engine reference. While active search operation keep the engine alive via reference in a ReaderContext, until the search completes.

In ES-6685 I need to get access, from the distributed layer, to an ES Engine implementation where active read information is tracked. I plan to create an external 'service' to hold the active read information because the ES Engine is gone. We should logically retain the IndexShard in a closed state until the storage engine is gone, and this would eliminate the need for external components with different lifecycles.

This is tech debt. Looks like the choice to reset the Engine reference on shard close was made ~10 years ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Indexing/EngineAnything around managing Lucene and the Translog in an open shard.Team:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions