Update the default values for some options
This commit is contained in:
parent
098f9578d6
commit
dca6b61bbb
2 changed files with 11 additions and 8 deletions
|
@ -59,7 +59,7 @@ Options object
|
||||||
Write operations.
|
Write operations.
|
||||||
|
|
||||||
| *Type:* ``bool``
|
| *Type:* ``bool``
|
||||||
| *Default:* ``False``
|
| *Default:* ``True``
|
||||||
|
|
||||||
.. py:attribute:: write_buffer_size
|
.. py:attribute:: write_buffer_size
|
||||||
|
|
||||||
|
@ -100,11 +100,14 @@ Options object
|
||||||
.. py:attribute:: max_open_files
|
.. py:attribute:: max_open_files
|
||||||
|
|
||||||
Number of open files that can be used by the DB. You may need to
|
Number of open files that can be used by the DB. You may need to
|
||||||
increase this if your database has a large working set (budget
|
increase this if your database has a large working set. Value -1 means
|
||||||
one open file per 2MB of working set).
|
files opened are always kept open. You can estimate number of
|
||||||
|
files based on target_file_size_base and target_file_size_multiplier
|
||||||
|
for level-based compaction.
|
||||||
|
For universal-style compaction, you can usually set it to -1.
|
||||||
|
|
||||||
| *Type:* ``int``
|
| *Type:* ``int``
|
||||||
| *Default:* ``1000``
|
| *Default:* ``5000``
|
||||||
|
|
||||||
.. py:attribute:: block_cache
|
.. py:attribute:: block_cache
|
||||||
|
|
||||||
|
@ -384,7 +387,7 @@ Options object
|
||||||
unnecessary Put stalls.
|
unnecessary Put stalls.
|
||||||
|
|
||||||
| *Type:* ``int``
|
| *Type:* ``int``
|
||||||
| *Default:* ``0``
|
| *Default:* ``1``
|
||||||
|
|
||||||
.. py:attribute:: max_log_file_size
|
.. py:attribute:: max_log_file_size
|
||||||
|
|
||||||
|
@ -545,7 +548,7 @@ Options object
|
||||||
Allow the OS to mmap file for reading sst tables
|
Allow the OS to mmap file for reading sst tables
|
||||||
|
|
||||||
| *Type:* ``bool``
|
| *Type:* ``bool``
|
||||||
| *Default:* ``False``
|
| *Default:* ``True``
|
||||||
|
|
||||||
.. py:attribute:: allow_mmap_writes
|
.. py:attribute:: allow_mmap_writes
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@ class TestMergeOperator(rocksdb.interfaces.MergeOperator):
|
||||||
class TestOptions(unittest.TestCase):
|
class TestOptions(unittest.TestCase):
|
||||||
def test_simple(self):
|
def test_simple(self):
|
||||||
opts = rocksdb.Options()
|
opts = rocksdb.Options()
|
||||||
self.assertEqual(False, opts.paranoid_checks)
|
|
||||||
opts.paranoid_checks = True
|
|
||||||
self.assertEqual(True, opts.paranoid_checks)
|
self.assertEqual(True, opts.paranoid_checks)
|
||||||
|
opts.paranoid_checks = False
|
||||||
|
self.assertEqual(False, opts.paranoid_checks)
|
||||||
|
|
||||||
self.assertIsNone(opts.filter_policy)
|
self.assertIsNone(opts.filter_policy)
|
||||||
ob = TestFilterPolicy()
|
ob = TestFilterPolicy()
|
||||||
|
|
Loading…
Reference in a new issue