Some users would like to specify where Stellar-Core stores bucket files because a default /tmp location is not always right (small partition, etc.)
A new config flag that is forwarded to Captive Stellar-Core config (both online and offline modes).
Ideally, Stellar-Core team implements https://github.com/stellar/stellar-core/issues/2942 so there is no need to store bucket files on disk.
According to the Golang documentation, we should be able to customize this with no changes to the codebase:
On Unix systems, it returns
$TMPDIRif non-empty, else /tmp. On Windows, it usesGetTempPath, returning the first non-empty value from%TMP%,%TEMP%,%USERPROFILE%, or the Windows directory. On Plan 9, it returns/tmp.
That means a user can customize where their Core buckets go via TMPDIR=~/.cache horizon --db-url=.... If we can document this scenario, I think that will close this issue. Thoughts @bartekn?
I think we should have a separate flag, even given it's configurable via TMPDIR:
/tmp partition was too small. So not setting TMPDIR will default to /tmp and this will cause the similar issues again.TMPDIR is not descriptive enough.Based on our conversation with ops, here's the strategy moving forward:
--storage-directory, --bucket-directory, --captive-core-bucket-directory; patents are pending) that will be passed along to Core's BUCKET_DIR_PATH./var/lib/stellar in their packaging-based deployments./tmp and friends will no longer be used.
Most helpful comment
Based on our conversation with ops, here's the strategy moving forward:
--storage-directory,--bucket-directory,--captive-core-bucket-directory; patents are pending) that will be passed along to Core'sBUCKET_DIR_PATH./var/lib/stellarin their packaging-based deployments./tmpand friends will no longer be used.