Skip to content

Add detailed configurations (storage path, LevelDB options and so on) for each database - #839

Merged
zhaohong merged 9 commits into
developfrom
db_change_config
May 27, 2018
Merged

zhaohong merged 9 commits into
developfrom
db_change_config

Conversation

@wind4869

@wind4869 wind4869 commented May 26, 2018 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add detailed configurations for each database, such as storage path and LevelDB options.

Why are these changes required?

Users may want to custom their storage path and LevelDB options for each database.

This PR has been tested by:

  • StorageTest
  • Manual Testing

Follow up

Extra details

You can custom these 14 databases' configs: account, account-index, asset-issue, block, block-index, block_KDB, peers, properties, recent-block, trans, utxo, votes, witness, witness_schedule.

Otherwise, db configs will remain defualt and data will be stored in the path of "output-directory" or which is set by "-d" ("--output-directory").

Attention: name is a required field that must be set !!!

Finally, an example:

storage {

  db.directory = "database",
  index.directory = "index",

  properties = [
    {
      name = "account",
      path = "storage_directory_test",
      createIfMissing = true,
      paranoidChecks = true,
      verifyChecksums = true,
      compressionType = 0,
      blockSize = 10485760,
      writeBufferSize = 10485760,
      cacheSize = 0,
      maxOpenFiles = 32
    },
  ]
}

@wind4869
wind4869 requested a review from zhaohong May 26, 2018 09:52
@zhaohong
zhaohong merged commit b4de313 into develop May 27, 2018
@shydesky
shydesky deleted the db_change_config branch November 13, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants