Skip to content

Conversation

@tlrx
Copy link
Member

@tlrx tlrx commented Mar 24, 2021

Note: I'm opening this PR as a suggestion, I'm fine with closing it straight away or hold it as long as more important changes required to be merged.

Searchable snapshots classes have been spread over multiple packages since the creation of the plugin's project (mea culpa). With the addition of the shared cache and other factorization of IndexInput's code it becomes less obvious to navigate the plugin codebase (at least for me).

This pull request reorganizes the classes to be structured like this:

.
└── org
    └── elasticsearch
        └── xpack
            └── searchablesnapshots
                ├── SearchableSnapshots.java
                ├── action
                │   ├── cache
                │   │   ├── FrozenCacheInfoAction.java
                │   │   ├── FrozenCacheInfoNodeAction.java
                │   │   ├── FrozenCacheInfoResponse.java
                │   │   └── TransportSearchableSnapshotCacheStoresAction.java
                │   ├── AbstractTransportSearchableSnapshotsAction.java
                │   ├── ClearSearchableSnapshotsCacheAction.java
                │   ├── ClearSearchableSnapshotsCacheRequest.java
                │   ├── ClearSearchableSnapshotsCacheResponse.java
                │   ├── SearchableSnapshotsInfoTransportAction.java
                │   ├── SearchableSnapshotsStatsAction.java
                │   ├── SearchableSnapshotsStatsRequest.java
                │   ├── SearchableSnapshotsStatsResponse.java
                │   ├── SearchableSnapshotsUsageTransportAction.java
                │   ├── TransportClearSearchableSnapshotsCacheAction.java
                │   ├── TransportMountSearchableSnapshotAction.java
                │   └── TransportSearchableSnapshotsStatsAction.java
                ├── allocation
                │   ├── decider
                │   │   ├── HasFrozenCacheAllocationDecider.java
                │   │   ├── SearchableSnapshotAllocationDecider.java
                │   │   └── SearchableSnapshotEnableAllocationDecider.java
                │   ├── FailShardsOnInvalidLicenseClusterListener.java
                │   ├── SearchableSnapshotAllocator.java
                │   ├── SearchableSnapshotIndexEventListener.java
                │   └── SearchableSnapshotIndexFoldersDeletionListener.java
                ├── cache
                │   ├── blob
                │   │   ├── BlobStoreCacheService.java
                │   │   └── CachedBlob.java
                │   ├── common
                │   │   ├── ByteRange.java
                │   │   ├── CacheFile.java
                │   │   ├── CacheKey.java
                │   │   ├── ProgressListenableActionFuture.java
                │   │   └── SparseFileTracker.java
                │   ├── full
                │   │   ├── CacheService.java
                │   │   └── PersistentCache.java
                │   └── shared
                │       ├── FrozenCacheInfoService.java
                │       ├── FrozenCacheService.java
                │       └── SharedBytes.java
                ├── recovery
                │   └── SearchableSnapshotRecoveryState.java
                ├── rest
                │   ├── RestClearSearchableSnapshotsCacheAction.java
                │   ├── RestMountSearchableSnapshotAction.java
                │   └── RestSearchableSnapshotsStatsAction.java
                └── store
                    ├── IndexInputStats.java
                    ├── InMemoryNoOpCommitDirectory.java
                    ├── input
                    │   ├── BaseSearchableSnapshotIndexInput.java
                    │   ├── CachedBlobContainerIndexInput.java
                    │   ├── ChecksumBlobContainerIndexInput.java
                    │   ├── DirectBlobContainerIndexInput.java
                    │   ├── FrozenIndexInput.java
                    │   └── MetadataCachingIndexInput.java
                    └── SearchableSnapshotDirectory.java

Files are only moved (not renamed), and only few methods and interfaces in CacheFile and TestUtils were made public. Unit and integration tests have been reorganized to follow the same package hierarchy.

@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Mar 24, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tlrx added a commit to tlrx/elasticsearch that referenced this pull request Mar 25, 2021
Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.x
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Mar 25, 2021
Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.12
@tlrx tlrx merged commit 64dee7a into elastic:master Mar 25, 2021
tlrx added a commit that referenced this pull request Mar 25, 2021
…70851)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.x
tlrx added a commit that referenced this pull request Mar 25, 2021
…#70852)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.12
@tlrx tlrx deleted the reorganise-searchable-snapshots-plugin branch March 25, 2021 09:54
ywelsch pushed a commit to ywelsch/elasticsearch that referenced this pull request Mar 26, 2021
…lastic#70851)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of elastic#70814 for 7.x
ywelsch pushed a commit that referenced this pull request Mar 26, 2021
…#70850)

Searchable snapshots classes have been spread over
multiple packages since the creation of the plugin's
project (mea culpa). With the addition of the shared
cache and other factorization of IndexInput's code
it becomes less obvious to navigate the plugin
codebase.

Backport of #70814 for 7.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.12.1 v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants