Skip to content
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

get \ put problem 120512 #1

Open
thenik opened this issue May 12, 2012 · 0 comments
Open

get \ put problem 120512 #1

thenik opened this issue May 12, 2012 · 0 comments

Comments

@thenik
Copy link

thenik commented May 12, 2012

the next code does not work....

var storageDirectory = Path.Combine(Application.StartupPath, "bdb");
Directory.CreateDirectory(storageDirectory);
var store = new FirkinHash(storageDirectory);
for (int i = 0; i < 10000000; i++)
{
var valueStream = store.Get(i.ToString());
if (valueStream == null)
{
break;
}
else
{
var r = valueStream.To();
if (r != i.ToString())
{
Debug.Assert(false);
}
}
}
for (int i = 0; i < 10000000; i++)
{
var st = i.ToStream();
store.Put(i.ToString(), st, st.Length);
}

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

No branches or pull requests

1 participant