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

I hope that exposed the StorageDiskMapped.sync () method, allows users to call in order to prevent loss of data. #19

Closed
wjw465150 opened this issue Mar 9, 2012 · 4 comments

Comments

@wjw465150
Copy link
Contributor

A suggestion: In disableTransactions environment when use StorageDiskMapped, I hope that exposed the sync () method, allows users to call in order to prevent loss of data.

@jankotek
Copy link
Owner

jankotek commented Mar 9, 2012

Hi,
sync method is not exposed. When transactions are enabled, sync is always called. When transactions are disabled, there are many ways how store could get corrupted, and calling sync would not help much. If you want speed, you simply have to close store properly.

@jankotek jankotek closed this as completed Mar 9, 2012
@wjw465150
Copy link
Contributor Author

but,When transactions are enabled,I found the commit () method not call MappedByteBuffer.force () method.

@jankotek
Copy link
Owner

Could you be more specific? I just made test and MappedByteBuffer.force() is called. Check StorageDiskMapped.sync() at line 174.

@wjw465150
Copy link
Contributor Author

I mean is: When call the db.commit() but no call StorageDiskMapped.sync()

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

2 participants