Lines Matching refs:a

3 The implementation of leveldb is similar in spirit to the representation of a
8 Each database is represented by a set of files stored in a directory. There are
13 A log file (*.log) stores a sequence of recent updates. Each update is appended
14 to the current log file. When the log file reaches a pre-determined size
15 (approximately 4MB by default), it is converted to a sorted table (see below)
16 and a new log file is created for future updates.
24 A sorted table (*.ldb) stores a sequence of entries sorted by key. Each entry is
25 either a value for the key, or a deletion marker for the key. (Deletion markers
28 The set of sorted tables are organized into a sequence of levels. The sorted
29 table generated from a log file is placed in a special **young** level (also
30 called level-0). When the number of young files exceeds a certain threshold
32 overlapping level-1 files to produce a sequence of new level-1 files (we create
33 a new level-1 file for every 2MB of data.)
39 overlapping files in level-(L+1) are merged to form a set of new files for
48 (with a new number embedded in the file name) is created whenever the database
49 is reopened. The MANIFEST file is formatted as a log, and changes made to the
54 CURRENT is a simple text file that contains the name of the latest MANIFEST
67 When the log file grows above a certain size (1MB by default):
68 Create a brand new memtable and log file and direct future updates here
77 When the size of level L exceeds its limit, we compact it in a background
78 thread. The compaction picks a file from level L and all overlapping files from
79 the next level L+1. Note that if a level-L file overlaps only part of a
83 level-0 to level-1 specially: a level-0 compaction may pick more than one
86 A compaction merges the contents of the picked files to produce a sequence of
87 level-(L+1) files. We switch to producing a new level-(L+1) file after the
88 current output file has reached the target file size (2MB). We also switch to a
90 to overlap more than ten level-(L+2) files. This last rule ensures that a later
91 compaction of a level-(L+1) file will not pick up too much data from
96 Compactions for a particular level rotate through the key space. In more detail,
103 are no higher numbered levels that contain a file whose range overlaps the
116 Assuming a disk IO rate of 100MB/s (ballpark range for modern drives), the worst
120 100MB/s speed, a compaction may take up to 5 seconds. If the user is writing at
148 | Files in directory | Microseconds to open a file |
162 * Convert log chunk to a new level-0 sstable
163 * Start directing new writes to a new log file with recovered sequence#