Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Use leveldb v1.22 for neo-cli release. #472

Closed
superboyiii opened this issue Sep 30, 2019 · 15 comments
Closed

Use leveldb v1.22 for neo-cli release. #472

superboyiii opened this issue Sep 30, 2019 · 15 comments

Comments

@superboyiii
Copy link
Member

I found leveldb has a critical BUG before which will cause mass leveldb files undisposed when frequently new a snapshot in a class file. Especially reproduce in Nep5Tracker plugin so I have to readjust the code to prevent it from this BUG. The bug could be seen here. google/leveldb#320
It's fixed several months ago in v1.22 release. google/leveldb#339
So I think we should include it in next neo-cli release until RocksDB applied.

@shargon
Copy link
Member

shargon commented Sep 30, 2019

Jeff warned about this long ago, I agree, this should be included in the next release.

@superboyiii
Copy link
Member Author

Jeff warned about this long ago, I agree, this should be included in the next release.

Yes, I also saw Jeff's comments. It's necessary for us to take place the old one.

@Ashuaidehao
Copy link
Contributor

https://www.nuget.org/packages/Neo.LevelDb.Dev/3.0.0-pre2
I have create a leveldb package with latest source code, can you help to test it?

@lock9
Copy link
Contributor

lock9 commented Nov 25, 2019

Hello @Ashuaidehao, how can we ensure this is working? Can we force the bug to happen somehow?

@Ashuaidehao
Copy link
Contributor

Hello @Ashuaidehao, how can we ensure this is working? Can we force the bug to happen somehow?

@superboyiii have helped to test it, please notify us if this bug reproduct.
@lock9 , we also put the new leveldb at here, anyone can download and test it.

@superboyiii
Copy link
Member Author

@nicolegys is going to test if it's compatible with the old one on VM state, let's wait for the result.

@superboyiii
Copy link
Member Author

superboyiii commented Nov 29, 2019

Hello @Ashuaidehao, how can we ensure this is working? Can we force the bug to happen somehow?

Build the latest RpcNep5Tracker and install it in neo-cli-2.10.3 sync to the latest height, and this issue will appear.

@shargon
Copy link
Member

shargon commented Nov 29, 2019

@nicolegys
Copy link
Contributor

I ran 2.10.3 and my build on the same server, then compared their Storage folders.

Results:
compareResult

Only 3 files have differences:
diff1
diff2
diff3

The differences are caused by the plugin(StatesDumper) itself. It would miss some blocks occasionally.

So it's compatible with 2.10.3 on VM state.

@superboyiii
Copy link
Member Author

@shargon @nicolegys will release the content in try and remove catch to see if this leveldb could fix this issue.

@nicolegys
Copy link
Contributor

@superboyiii Please, could you check if also this bug will disappear?

https://github.com/neo-project/neo/blob/15f59a7a4c8610b3d640a2840db6d76947bc3266/neo/IO/Data/LevelDB/DB.cs#L106-L109

@shargon I'm a little confused.
I wanted to see what the bug is. So I released the content in try and remove catch, then using our old leveldb, syncing to the latest height. One day passed, this bug didn't appear.
Maybe this old bug in .Net Core has been fixed...
Could you tell me how can I reproduce this bug, Or it appears very infrequently so i need to wait?

@shargon
Copy link
Member

shargon commented Dec 3, 2019

I don't know hahaha i only read the comment, but it should come from long time ago...

@nicolegys
Copy link
Contributor

I test with this leveldb v1.22, installing the RpcNep5Tracker(master-2.x branch), and the bug still exists. #419
image
image

So at this time, I still need to use @superboyiii 's fix , to make sure the number of chain files stable

@nicolegys
Copy link
Contributor

The issue that leveldb files undisposed has been fixed in the following PRs.
#507
neo-project/neo-modules#167
neo-project/neo#1350
neo-project/neo#1366

And I have tested that v1.22 is compatible with the old one on VM state.

So should we include leveldb v1.22 in the next release?

@vncoelho
Copy link
Member

vncoelho commented Jan 9, 2020

Let's go for it, @nicolegys @superboyiii @shargon @Ashuaidehao ?

@nicolegys and @superboyiii, you mentioned some problem with the Dump plugin? Does it proceed? If that is the case can you give an idea for us to fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants