## What is the purpose of the change

This PR always sets a default environment when creating the `DBOptions`. This 
could simplify resource management for multiple RocksDB instances on one 
machine.

See https://github.com/facebook/rocksdb/wiki/rocksdb-basics:
Support for Multiple Embedded Databases in the same process
A common use-case for RocksDB is that applications inherently partition their 
data set into logical partitions or shards. This technique benefits application 
load balancing and fast recovery from faults. This means that a single server 
process should be able to operate multiple RocksDB databases simultaneously. 
This is done via an environment object named Env. Among other things, a thread 
pool is associated with an Env. If applications want to share a common thread 
pool (for background compactions) among multiple database instances, then it 
should use the same Env object for opening those databases.

Similarly, multiple database instances may share the same block cache.

## Verifying this change

This change added tests and can be verified as follows:
`RocksDBStateBackendConfigTest#testSetDefaultEnvInOptions`

## Does this pull request potentially affect one of the following parts:

  - Dependencies (does it add or upgrade a dependency): (no)
  - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
  - The serializers: (no)
  - The runtime per-record code paths (performance sensitive): (yes)
  - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)
  - The S3 file system connector: (no)

## Documentation

  - Does this pull request introduce a new feature? (no)
  - If yes, how is the feature documented? (not applicable)


[ Full content available at: https://github.com/apache/flink/pull/6603 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to