Skip to content

Commit 9ed7a24

Browse files
committed
Silence some warnings from IntelliJ
1 parent 68eff34 commit 9ed7a24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCache.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@
5555
/**
5656
* This is a cache for {@link BitSet} instances that are used with the {@link DocumentSubsetReader}.
5757
* It is bounded by memory size and access time.
58-
*
58+
* <p>
5959
* DLS uses {@link BitSet} instances to track which documents should be visible to the user ("live") and which should not ("dead").
6060
* This means that there is a bit for each document in a Lucene index (ES shard).
6161
* Consequently, an index with 10 million document will use more than 1Mb of bitset memory for every unique DLS query, and an index
6262
* with 1 billion documents will use more than 100Mb of memory per DLS query.
6363
* Because DLS supports templating queries based on user metadata, there may be many distinct queries in use for each index, even if
6464
* there is only a single active role.
65-
*
65+
* <p>
6666
* The primary benefit of the cache is to avoid recalculating the "live docs" (visible documents) when a user performs multiple
6767
* consecutive queries across one or more large indices. Given the memory examples above, the cache is only useful if it can hold at
6868
* least 1 large (100Mb or more ) {@code BitSet} during a user's active session, and ideally should be capable of support multiple
6969
* simultaneous users with distinct DLS queries.
70-
*
70+
* <p>
7171
* For this reason the default memory usage (weight) for the cache set to 10% of JVM heap ({@link #CACHE_SIZE_SETTING}), so that it
7272
* automatically scales with the size of the Elasticsearch deployment, and can provide benefit to most use cases without needing
7373
* customisation. On a 32Gb heap, a 10% cache would be 3.2Gb which is large enough to store BitSets representing 25 billion docs.
74-
*
74+
* <p>
7575
* However, because queries can be templated by user metadata and that metadata can change frequently, it is common for the
7676
* effetively lifetime of a single DLS query to be relatively short. We do not want to sacrifice 10% of heap to a cache that is storing
7777
* BitSets that are not longer needed, so we set the TTL on this cache to be 2 hours ({@link #CACHE_TTL_SETTING}). This time has been

0 commit comments

Comments
 (0)