Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Options that are missing in the latest RocksDB git repository.… #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 10 additions & 77 deletions docs/api/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Options object

.. py:class:: rocksdb.Options

.. IMPORTANT::
.. IMPORTANT::

The default values mentioned here, describe the values of the
C++ library only. This wrapper does not set any default value
Expand All @@ -18,7 +18,7 @@ Options object
| Most recent default values should be here
| https://github.com/facebook/rocksdb/blob/master/include/rocksdb/options.h
| https://github.com/facebook/rocksdb/blob/master/util/options.cc

.. py:method:: __init__(**kwargs)

All options mentioned below can also be passed as keyword-arguments in
Expand Down Expand Up @@ -215,48 +215,6 @@ Options object
| *Type:* ``[int]``
| *Default:* ``[1, 1, 1, 1, 1, 1, 1]``

.. py:attribute:: expanded_compaction_factor

Maximum number of bytes in all compacted files. We avoid expanding
the lower level file set of a compaction if it would make the
total compaction cover more than
(expanded_compaction_factor * targetFileSizeLevel()) many bytes.

| *Type:* ``int``
| *Default:* ``25``

.. py:attribute:: source_compaction_factor

Maximum number of bytes in all source files to be compacted in a
single compaction run. We avoid picking too many files in the
source level so that we do not exceed the total source bytes
for compaction to exceed
(source_compaction_factor * targetFileSizeLevel()) many bytes.
If 1 pick maxfilesize amount of data as the source of
a compaction.

| *Type:* ``int``
| *Default:* ``1``

.. py:attribute:: max_grandparent_overlap_factor

Control maximum bytes of overlaps in grandparent (i.e., level+2) before we
stop building a single file in a level->level+1 compaction.

| *Type:* ``int``
| *Default:* ``10``

.. py:attribute:: disable_data_sync

If true, then the contents of data files are not synced
to stable storage. Their contents remain in the OS buffers till the
OS decides to flush them. This option is good for bulk-loading
of data. Once the bulk-loading is complete, please issue a
sync to the OS to flush all dirty buffesrs to stable storage.

| *Type:* ``bool``
| *Default:* ``False``

.. py:attribute:: use_fsync

If true, then every store to stable storage will issue a fsync.
Expand Down Expand Up @@ -399,15 +357,15 @@ Options object
size of one block in arena memory allocation.
If <= 0, a proper value is automatically calculated (usually 1/10 of
writer_buffer_size).

| *Type:* ``int``
| *Default:* ``0``

.. py:attribute:: disable_auto_compactions

Disable automatic compactions. Manual compactions can still
be issued on this database.

| *Type:* ``bool``
| *Default:* ``False``

Expand Down Expand Up @@ -447,13 +405,6 @@ Options object
| *Type:* ``bool``
| *Default:* ``True``

.. py:attribute:: allow_os_buffer

Data being read from file storage may be buffered in the OS

| *Type:* ``bool``
| *Default:* ``True``

.. py:attribute:: allow_mmap_reads

Allow the OS to mmap file for reading sst tables
Expand All @@ -479,7 +430,7 @@ Options object

Skip log corruption error on recovery
(If client is ok with losing most recent changes)

| *Type:* ``bool``
| *Default:* ``False``

Expand All @@ -504,7 +455,7 @@ Options object
to kernel. This could reduce context switch when the mutex is not
heavily contended. However, if the mutex is hot, we could end up
wasting spin time.

| *Type:* ``bool``
| *Default:* ``False``

Expand All @@ -513,18 +464,10 @@ Options object
Allows OS to incrementally sync files to disk while they are being
written, asynchronously, in the background.
Issue one request for every bytes_per_sync written. 0 turns it off.

| *Type:* ``int``
| *Default:* ``0``

.. py:attribute:: verify_checksums_in_compaction

If ``True``, compaction will verify checksum on every read that
happens as part of compaction.

| *Type:* ``bool``
| *Default:* ``True``

.. py:attribute:: compaction_style

The compaction style. Could be set to ``"level"`` to use level-style
Expand Down Expand Up @@ -603,23 +546,13 @@ Options object
opts = rocksdb.Options()
opts.compaction_options_universal = {'stop_style': 'similar_size'}

.. py:attribute:: filter_deletes

Use KeyMayExist API to filter deletes when this is true.
If KeyMayExist returns false, i.e. the key definitely does not exist, then
the delete is a noop. KeyMayExist only incurs in-memory look up.
This optimization avoids writing the delete to storage when appropriate.

| *Type:* ``bool``
| *Default:* ``False``

.. py:attribute:: max_sequential_skip_in_iterations

An iteration->Next() sequentially skips over keys with the same
user-key unless this option is set. This number specifies the number
of keys (with the same userkey) that will be sequentially
skipped before a reseek is issued.

| *Type:* ``int``
| *Default:* ``8``

Expand Down Expand Up @@ -654,7 +587,7 @@ Options object
* key exists in current memtable
* new sizeof(new_value) <= sizeof(old_value)
* old_value for that key is a put i.e. kTypeValue

| *Type:* ``bool``
| *Default:* ``False``

Expand Down Expand Up @@ -694,7 +627,7 @@ Options object
:py:class:`rocksdb.interfaces.MergeOperator` or
:py:class:`rocksdb.interfaces.AssociativeMergeOperator`
interface.

*Default:* ``None``

.. py:attribute:: prefix_extractor
Expand Down
42 changes: 0 additions & 42 deletions rocksdb/_rocksdb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -868,30 +868,6 @@ cdef class Options(object):
def __set__(self, value):
self.opts.max_bytes_for_level_multiplier_additional = value

property expanded_compaction_factor:
def __get__(self):
return self.opts.expanded_compaction_factor
def __set__(self, value):
self.opts.expanded_compaction_factor = value

property source_compaction_factor:
def __get__(self):
return self.opts.source_compaction_factor
def __set__(self, value):
self.opts.source_compaction_factor = value

property max_grandparent_overlap_factor:
def __get__(self):
return self.opts.max_grandparent_overlap_factor
def __set__(self, value):
self.opts.max_grandparent_overlap_factor = value

property disable_data_sync:
def __get__(self):
return self.opts.disableDataSync
def __set__(self, value):
self.opts.disableDataSync = value

property use_fsync:
def __get__(self):
return self.opts.use_fsync
Expand Down Expand Up @@ -1012,12 +988,6 @@ cdef class Options(object):
def __set__(self, value):
self.opts.purge_redundant_kvs_while_flush = value

property allow_os_buffer:
def __get__(self):
return self.opts.allow_os_buffer
def __set__(self, value):
self.opts.allow_os_buffer = value

property allow_mmap_reads:
def __get__(self):
return self.opts.allow_mmap_reads
Expand Down Expand Up @@ -1066,12 +1036,6 @@ cdef class Options(object):
def __set__(self, value):
self.opts.bytes_per_sync = value

property verify_checksums_in_compaction:
def __get__(self):
return self.opts.verify_checksums_in_compaction
def __set__(self, value):
self.opts.verify_checksums_in_compaction = value

property compaction_style:
def __get__(self):
if self.opts.compaction_style == kCompactionStyleLevel:
Expand Down Expand Up @@ -1137,12 +1101,6 @@ cdef class Options(object):
else:
raise Exception("Unknown compaction style")

property filter_deletes:
def __get__(self):
return self.opts.filter_deletes
def __set__(self, value):
self.opts.filter_deletes = value

property max_sequential_skip_in_iterations:
def __get__(self):
return self.opts.max_sequential_skip_in_iterations
Expand Down
7 changes: 0 additions & 7 deletions rocksdb/options.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ cdef extern from "rocksdb/options.h" namespace "rocksdb":
uint64_t max_bytes_for_level_base
int max_bytes_for_level_multiplier
vector[int] max_bytes_for_level_multiplier_additional
int expanded_compaction_factor
int source_compaction_factor
int max_grandparent_overlap_factor
# TODO: statistics
cpp_bool disableDataSync
cpp_bool use_fsync
string db_log_dir
string wal_dir
Expand All @@ -86,7 +82,6 @@ cdef extern from "rocksdb/options.h" namespace "rocksdb":
uint64_t WAL_size_limit_MB
size_t manifest_preallocation_size
cpp_bool purge_redundant_kvs_while_flush
cpp_bool allow_os_buffer
cpp_bool allow_mmap_reads
cpp_bool allow_mmap_writes
cpp_bool is_fd_close_on_exec
Expand All @@ -96,10 +91,8 @@ cdef extern from "rocksdb/options.h" namespace "rocksdb":
# TODO: enum { NONE, NORMAL, SEQUENTIAL, WILLNEED } access_hint_on_compaction_start
cpp_bool use_adaptive_mutex
uint64_t bytes_per_sync
cpp_bool verify_checksums_in_compaction
CompactionStyle compaction_style
CompactionOptionsUniversal compaction_options_universal
cpp_bool filter_deletes
uint64_t max_sequential_skip_in_iterations
shared_ptr[MemTableRepFactory] memtable_factory
shared_ptr[TableFactory] table_factory
Expand Down