Packages
rocksdb
1.1.1
3.1.2
3.1.1
3.1.0
3.0.0
2.6.2
2.6.1
retired
2.6.0
retired
2.5.0
2.4.1
2.4.0
2.3.0
2.2.0
2.1.0
2.0.0
1.9.0
1.8.0
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0
1.0.0
0.26.2
0.26.1
0.26.0
0.25.0
0.24.0
0.23.3
0.23.2
0.23.1
0.23.0
0.22.0
0.21.0
0.20.1
0.20.0
0.19.0
0.18.0
0.17.0
0.16.0
0.15.0
0.14.0
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.9.1
0.9.0
0.8.2
0.8.1
0.8.0
0.7.1
0.7.0
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
RocksDB for Erlang
Current section
Files
Jump to
Current section
Files
doc/rocksdb_sst_file_manager.md
# Module rocksdb_sst_file_manager #
* [Function Index](#index)
* [Function Details](#functions)
<a name="index"></a>
## Function Index ##
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#get_delete_rate_bytes_per_second-1">get_delete_rate_bytes_per_second/1</a></td><td>Return delete rate limit in bytes per second.</td></tr><tr><td valign="top"><a href="#get_max_trash_db_ratio-1">get_max_trash_db_ratio/1</a></td><td>Return trash/DB size ratio where new files will be deleted immediately.</td></tr><tr><td valign="top"><a href="#get_total_size-1">get_total_size/1</a></td><td>Return the total size of all tracked files.</td></tr><tr><td valign="top"><a href="#get_total_trash_size-1">get_total_trash_size/1</a></td><td>Return the total size of trash files.</td></tr><tr><td valign="top"><a href="#is_max_allowed_space_reached-1">is_max_allowed_space_reached/1</a></td><td>Return true if the total size of SST files exceeded the maximum allowed
space usage.</td></tr><tr><td valign="top"><a href="#is_max_allowed_space_reached_including_compactions-1">is_max_allowed_space_reached_including_compactions/1</a></td><td>Returns true if the total size of SST files as well as estimated size
of ongoing compactions exceeds the maximums allowed space usage.</td></tr><tr><td valign="top"><a href="#set_compaction_buffer_size-2">set_compaction_buffer_size/2</a></td><td>Set the amount of buffer room each compaction should be able to leave.</td></tr><tr><td valign="top"><a href="#set_delete_rate_bytes_per_second-2">set_delete_rate_bytes_per_second/2</a></td><td>Update the delete rate limit in bytes per second.</td></tr><tr><td valign="top"><a href="#set_max_allowed_usage-2">set_max_allowed_usage/2</a></td><td>Update the maximum allowed space that should be used by RocksDB, if
the total size of the SST files exceeds MaxAllowedSpace, writes to
RocksDB will fail.</td></tr><tr><td valign="top"><a href="#set_max_trash_db_ratio-2">set_max_trash_db_ratio/2</a></td><td>Update trash/DB size ratio where new files will be deleted immediately.</td></tr></table>
<a name="functions"></a>
## Function Details ##
<a name="get_delete_rate_bytes_per_second-1"></a>
### get_delete_rate_bytes_per_second/1 ###
<pre><code>
get_delete_rate_bytes_per_second(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> non_neg_integer()
</code></pre>
<br />
Return delete rate limit in bytes per second.
<a name="get_max_trash_db_ratio-1"></a>
### get_max_trash_db_ratio/1 ###
<pre><code>
get_max_trash_db_ratio(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> float()
</code></pre>
<br />
Return trash/DB size ratio where new files will be deleted immediately
<a name="get_total_size-1"></a>
### get_total_size/1 ###
<pre><code>
get_total_size(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> non_neg_integer()
</code></pre>
<br />
Return the total size of all tracked files.
<a name="get_total_trash_size-1"></a>
### get_total_trash_size/1 ###
<pre><code>
get_total_trash_size(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> non_neg_integer()
</code></pre>
<br />
Return the total size of trash files
<a name="is_max_allowed_space_reached-1"></a>
### is_max_allowed_space_reached/1 ###
<pre><code>
is_max_allowed_space_reached(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> boolean()
</code></pre>
<br />
Return true if the total size of SST files exceeded the maximum allowed
space usage.
<a name="is_max_allowed_space_reached_including_compactions-1"></a>
### is_max_allowed_space_reached_including_compactions/1 ###
<pre><code>
is_max_allowed_space_reached_including_compactions(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>) -> boolean()
</code></pre>
<br />
Returns true if the total size of SST files as well as estimated size
of ongoing compactions exceeds the maximums allowed space usage.
<a name="set_compaction_buffer_size-2"></a>
### set_compaction_buffer_size/2 ###
<pre><code>
set_compaction_buffer_size(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>, CompactionBufferSize::non_neg_integer()) -> ok
</code></pre>
<br />
Set the amount of buffer room each compaction should be able to leave.
In other words, at its maximum disk space consumption, the compaction
should still leave compaction_buffer_size available on the disk so that
other background functions may continue, such as logging and flushing.
<a name="set_delete_rate_bytes_per_second-2"></a>
### set_delete_rate_bytes_per_second/2 ###
<pre><code>
set_delete_rate_bytes_per_second(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>, DeleteRate::non_neg_integer()) -> ok
</code></pre>
<br />
Update the delete rate limit in bytes per second.
zero means disable delete rate limiting and delete files immediately
<a name="set_max_allowed_usage-2"></a>
### set_max_allowed_usage/2 ###
<pre><code>
set_max_allowed_usage(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>, MaxAllowedSpace::non_neg_integer()) -> ok
</code></pre>
<br />
Update the maximum allowed space that should be used by RocksDB, if
the total size of the SST files exceeds MaxAllowedSpace, writes to
RocksDB will fail.
setting MaxAllowedSpace to 0 will disable this feature; maximum allowed
pace will be infinite (Default value).
<a name="set_max_trash_db_ratio-2"></a>
### set_max_trash_db_ratio/2 ###
<pre><code>
set_max_trash_db_ratio(SstFileManager::<a href="rocksdb.md#type-sst_file_manager">rocksdb:sst_file_manager()</a>, Ratio::float()) -> ok
</code></pre>
<br />
Update trash/DB size ratio where new files will be deleted immediately