diff --git a/CHANGELOG.md b/CHANGELOG.md index b68a0bb37..9921d56c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +* Document that `default` column family doesn't inherit open options of db ( + 0xdeafbeef) ## 0.22.0 (2024-02-13) diff --git a/src/db.rs b/src/db.rs index 554fd7948..da4c37885 100644 --- a/src/db.rs +++ b/src/db.rs @@ -408,6 +408,8 @@ impl DBWithThreadMode { /// Opens a database with the given database with a Time to Live compaction filter and /// column family descriptors. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_descriptors_with_ttl( opts: &Options, path: P, @@ -454,6 +456,8 @@ impl DBWithThreadMode { } /// Opens a database for read only with the given database options and column family names. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_for_read_only( opts: &Options, path: P, @@ -480,6 +484,8 @@ impl DBWithThreadMode { } /// Opens a database for read only with the given database options and column family names. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_with_opts_for_read_only( db_opts: &Options, path: P, @@ -507,6 +513,8 @@ impl DBWithThreadMode { /// Opens a database for ready only with the given database options and /// column family descriptors. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_descriptors_read_only( opts: &Options, path: P, @@ -528,6 +536,8 @@ impl DBWithThreadMode { } /// Opens the database as a secondary with the given database options and column family names. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_as_secondary( opts: &Options, primary_path: P, @@ -555,6 +565,8 @@ impl DBWithThreadMode { /// Opens the database as a secondary with the given database options and /// column family descriptors. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_descriptors_as_secondary( opts: &Options, path: P, @@ -576,6 +588,8 @@ impl DBWithThreadMode { } /// Opens a database with the given database options and column family descriptors. + /// *NOTE*: `default` column family is opened with `Options::default()`. + /// If you want to open `default` cf with different options, set them explicitly in `cfs`. pub fn open_cf_descriptors(opts: &Options, path: P, cfs: I) -> Result where P: AsRef, diff --git a/src/transactions/optimistic_transaction_db.rs b/src/transactions/optimistic_transaction_db.rs index 5ce3bff2b..89a061ce5 100644 --- a/src/transactions/optimistic_transaction_db.rs +++ b/src/transactions/optimistic_transaction_db.rs @@ -100,6 +100,9 @@ impl OptimisticTransactionDB { /// Opens a database with the given database options and column family names. /// /// Column families opened using this function will be created with default `Options`. + /// *NOTE*: `default` column family will be opened with the `Options::default()`. + /// If you want to open `default` column family with custom options, use `open_cf_descriptors` and + /// provide a `ColumnFamilyDescriptor` with the desired options. pub fn open_cf(opts: &Options, path: P, cfs: I) -> Result where P: AsRef,