neuron icon indicating copy to clipboard operation
neuron copied to clipboard

Path dialogs for "data" and "indexer" selection are inconsistent

Open matt-nervos opened this issue 3 years ago • 7 comments

When selecting alternative folders for "data" and "indexer" locations, it seems that the dialog is looking for different directories levels, which leads to some troubleshooting from the user.

Screenshots show configuration and actual folder paths 2 1

The "data" and "indexer" directories are at the same folder level but are required to be differently specified in Neuron to reach the path.

It seems like the path is assuming (or creating) the "data" folder, but "indexer" folder is directly specified

matt-nervos avatar Jul 29 '22 20:07 matt-nervos

Hi @mattquinn-nervos , The two directories are independent and do not affect each other. So they need to be set separately. About the Node Data directory, Neuron automatically recognizes if a CKB Node is available in that directory and starts it. If no CKB Node is available in the directory, Neuron automatically initializes a Mainnet CKB Node. About the Indexer Data directory, Neuron also automatically recognizes if there are any old Indexer Data available in the directory. If no Indexer Data is available in the directory, Neuron automatically creates an Indexer directory based on the current CKB node.

Cedar67 avatar Aug 01 '22 05:08 Cedar67

Thanks @Cedar67 , I appreciate the explanation.

Can you understand why it is confusing to a user? When I directly select the "indexer" folder, things work ok, when I directly select the "data" folder, Neuron creates the node directories in that folder, instead of seeing that there is already node data in that folder. Hope my explanation makes sense

matt-nervos avatar Aug 01 '22 14:08 matt-nervos

Thanks @Cedar67 , I appreciate the explanation.

Can you understand why it is confusing to a user? When I directly select the "indexer" folder, things work ok, when I directly select the "data" folder, Neuron creates the node directories in that folder, instead of seeing that there is already node data in that folder. Hope my explanation makes sense

Thank you for your additional description. @mattquinn-nervos
when we directly select the "data" folder, Neuron automatically detects whether a node is already available in the current specified directory. It don't always create Node directories. If you find any situation that does not conform to this logical flow, could you please provide reproduce information so that we can locate it? In addition, the Node Data directory Settings, here is not only set the Data storage path, also includes the Node configuration, log and other related files and folders. It can be confusing to the user. Neuron plans to change the name of this label to "CKB Node Config & Storage" in the next release.

Cedar67 avatar Aug 02 '22 08:08 Cedar67

Thanks for your reply, it does look like this hits a bug somewhere in the code path.

I'm including screenshots of before and after updating configuration to point directly at the folder. A new "data" subdirectory is created, but block # still comes from parent "data" directory but the node won't sync.

The new subdirectory is basically empty.

Original configuration and folders (which works)

image

change to

image image

After about 15 minutes, this is still the same image

matt-nervos avatar Aug 02 '22 14:08 matt-nervos

Thanks for your reply, it does look like this hits a bug somewhere in the code path.

I'm including screenshots of before and after updating configuration to point directly at the folder. A new "data" subdirectory is created, but block # still comes from parent "data" directory but the node won't sync.

After about 15 minutes, this is still the same image

@mattquinn-nervos Thank you for the issue of feedback.

The Neuron page shows the synch status and progress of the Indexer, not the CKB node. Since the CKB node path has a new empty directory, the CKB node data needs to be resynchronized from scratch. This process may take several hours. this issue will optimize it to reduce user confusion. If you want to restore synchronization as soon as possible, migrate all the contents of the previous CKB node directory to the new directory before setting a new directory.

Cedar67 avatar Aug 04 '22 08:08 Cedar67

thanks @Cedar67 . The sync doesn't start from genesis in this circumstance, it stalls at the indexer block height, it seems like something is not matching up with expected behavior

I would expect when directly selecting the "data" directory Neuron would see there is node data in that folder, from your comment "when we directly select the "data" folder, Neuron automatically detects whether a node is already available in the current specified directory."

however Neuron does not detect that node data is there and creates a new "data" folder inside that folder and shows the current block height from the indexer and sync is stalled

matt-nervos avatar Aug 08 '22 17:08 matt-nervos

@mattquinn-nervos thanks for your reply.

I would expect when directly selecting the "data" directory Neuron would see there is node data in that folder, from your comment "when we directly select the "data" folder, Neuron automatically detects whether a node is already available in the current specified directory."

however Neuron does not detect that node data is there and creates a new "data" folder inside that folder and shows the current block height from the indexer and sync is stalled

By detecting CKB node profiles(Shown below), Neuron determines whether valid node exist, not through the Data directory. image

The sync doesn't start from genesis in this circumstance, it stalls at the indexer block height, it seems like something is not matching up with expected behavior

This will be fixed. When CKB node data is resynchronized from scratch, Indexer data is also resynchronized from 0%.

Cedar67 avatar Aug 09 '22 02:08 Cedar67

This issue may be stale later because ckb indexer is going to be integrated into ckb node.

Along with this update, there's only one path for data storage.

Ref: https://github.com/nervosnetwork/ckb/pull/3609

Keith-CY avatar Oct 22 '22 08:10 Keith-CY

Mark this issue stale because no activity for 60 days

github-actions[bot] avatar Jun 16 '23 05:06 github-actions[bot]

Close this issue because it's inactive since marked stale

github-actions[bot] avatar Jun 23 '23 05:06 github-actions[bot]