US 11,675,694 B2
Key-value stores with optimized merge policies and optimized LSM-tree structures
Stratos Idreos, Cambridge, MA (US); and Niv Dayan, Somerville, MA (US)
Assigned to President and Fellows of Harvard College, Cambridge, MA (US)
Filed by Stratos Idreos, Cambridge, MA (US); and Niv Dayan, Somerville, MA (US)
Filed on Jul. 15, 2021, as Appl. No. 17/376,827.
Application 17/376,827 is a continuation of application No. 16/963,411, granted, now 11,151,028, previously published as PCT/US2019/014493, filed on Jan. 22, 2019.
Claims priority of provisional application 62/619,957, filed on Jan. 22, 2018.
Prior Publication US 2021/0342259 A1, Nov. 4, 2021
Int. Cl. G06F 12/02 (2006.01); G06F 16/22 (2019.01); G06F 16/17 (2019.01)
CPC G06F 12/0238 (2013.01) [G06F 16/1734 (2019.01); G06F 16/2246 (2019.01); G06F 2212/7202 (2013.01)] 24 Claims
OG exemplary drawing
 
1. A database system comprising:
a main memory;
a secondary store comprising nonvolatile storage;
memory containing a log-structured merge-tree (LSM-tree) providing indexed access to files stored in the file buffer and the secondary store, the LSM-tree being organized to accommodate a range of merge policies; and
a processor for accessing runs in the main memory, each of the runs including a plurality of key-value pairs sorted by key, wherein:
(i) each of the runs is sorted and has a size;
(ii) the runs are organized into a plurality of levels according to run size; and
(iii) the processor is configured to select a merge policy from a plurality of alternatives and operate the LSM-tree in accordance with the selected merge policy, the merge policy determining a frequency of merging runs within each of the LSM-tree levels.