...
Splitting each data region (DataRegionConfiguration) to a number of segments allows to minimise contention on one lock for region (striping technique is used).
Structure of segments and Loaded Pages Map is shown at fugure:
...
Since Ignite version 2.5 Loaded Pages Id Table uses Robin Hood hashing: backward shift deletion algorithm for maintatining HashMap of FullPageId (CacheId, PageId)->(Address, PartGeneration).
To select approrpiate segment Ignite hashes Full Page Id, and (hash % segmentNo) gives the number.
In segment in LoadedPagesTable Ignite also hashes FullPageId to select approptiate bucket in the table.
...
Structure of segments and Loaded Pages Map is shown at fugure:
Gliffy Diagram name segmentsAndPageTable
Since Ignite version 2.5 Loaded Pages Id Table uses Robin Hood hashing: backward shift deletion algorithm for maintatining HashMap of FullPageId (CacheId, PageId)->(Address, PartGeneration).
To select approrpiate segment Ignite hashes Full Page Id, and (hash % segmentNo) gives the number.
In segment in LoadedPagesTable Ignite also hashes FullPageId to select approptiate bucket in the table.
In case of hash collision inside LoadedPagesTable lineral probe is used to find page by ID. If empty bucket is found, search is finished: page is not present in RAM.
Segment lock is read-write:
Page itself also has its own lock. This lock may be acquired only for page available in RAM and only for pinned (acquired) page.
Gliffy Diagram name segmentsAndPagesLocks
Since Ignite version 2.5 there are two optimizations introduced. Segment write lock
...