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

DaoStateStorageService: Fix shutdown data corruption bug #6548

Conversation

alvasw
Copy link
Contributor

@alvasw alvasw commented Jan 31, 2023

The DaoStateStorageService submits tasks to a daemon thread executor service. The JVM continues to execute threads until all non-daemon threads have terminated. So the JVM will kill the DaoStateStorageService during write requests leading to data corruption.

This change uses a non-daemon thread executor service at waits during shutdown until all data is written to disk.

The DaoStateStorageService submits tasks to a daemon thread executor
service. The JVM continues to execute threads until all non-daemon
threads have terminated. So the JVM will kill the DaoStateStorageService
during write requests leading to data corruption.

This change uses a non-daemon thread executor service at waits during
shutdown until all data is written to disk.
@alejandrogarcia83 alejandrogarcia83 added this to the v1.9.10 milestone Jan 31, 2023
Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@alejandrogarcia83 alejandrogarcia83 merged commit f24e0f2 into bisq-network:master Feb 3, 2023
@alvasw alvasw deleted the fix_dao_state_storage_service_shutdown_data_corruption_bug branch February 6, 2023 12:04
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

Successfully merging this pull request may close these issues.

2 participants