-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Improve [empty] block indexing by using an alternative to symlinks with absolute paths #3853
Comments
So, do you say the root problem is that symlinks have an absolute path rather than a relative one? Should be an easy fix |
Correct ! LE: Also some logging mentioning that it may take a while to convert all these links. Ideally there should be no symlinks at all because of the partial compatibility with backup tools.
|
We might provide automatic converting from If passing an option |
Thank you for issue! We will use relative path in symlinks starting from the next version. |
I used a similar script to migrate my symlinks. That would work. As for backing up I agree it's worth mentioning the |
I tested your script against my db. It takes ~30 mins to complete and it's working fine. 634325 entries updated. |
Hi,
The "issue":
Right now, on celestia mocha there are
634247
links insideblocks/heights
folder, all poiting to:/home/celestia-bridge-t-shwap/.celestia-bridge-mocha-4/blocks/3D96B7D238E7E0456F6AF8E7CDF0A67BD6CF9C2089ECB559C659DCAA1F880353.ods
The above is the "absolute" path in my filesystem.
And this is the reason I'm asking for this "feature request", I didn't consider it a BUG, but it's problematic being "absolute".
Why is this problematic:
The links above are all using absolute paths towards the block hash
3D96B7D238E7E0456F6AF8E7CDF0A67BD6CF9C2089ECB559C659DCAA1F880353.ods
which is a "special empty block" accrodiing to @WondertanFor node runners who run archival bridge nodes these links are:
Solution:
The first thing that crossed my mind was, Why not use a KVdb for this?
And it seems it's overkill since this behavior only happens when empty blocks are created, and we don't expect to many empty blocks on mainnet.
Then another idea:
Why not using the same symlinks but make them relative considering the directory structure. The current structure:
Therefore, each symlink could point to
../3D96B7D238E7E0456F6AF8E7CDF0A67BD6CF9C2089ECB559C659DCAA1F880353.ods.
Not sure if this could have other implications, but I hope we can elaborate on the subject.
The database should be 100% flexible and we should be able to move it from X to Y instead of beeying rooted on the folder it was first initialized.
The text was updated successfully, but these errors were encountered: