Repository navigation
Conversation
1 task done
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Author
|
Superseded by #3172, which removed the per-engine AuditDatabase and stopped pushing external database engines after writes. The mutable local H2 file that motivated this PR is no longer present in the synchronized engine folder, so closing every database during pushEngine is unnecessary and could disrupt active database operations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a cloud synchronization issue where SEMOSS could upload a database engine’s local H2 audit file while H2 was modifying or compacting it.
External databases can return false from holdsFileLocks() because their primary database is remote, even though they still maintain a local audit_log_database.mv.db. Uploading this live file could cause the Azure/Netty chunked uploader to enter a zero-progress CPU loop and stall other cloud-storage requests.
Changes Made
• Close all DATABASE engines before synchronizing their engine folders.
• Preserve the existing holdsFileLocks() behavior for other engine types.
• Reopen database engines after successful synchronization.
• Reopen database engines when synchronization fails.
• Ensure the engine synchronization lock is always released.
• Add unit tests covering:
o External databases without primary file locks.
o Non-database engines without file locks.
o Engine recovery and lock release after transfer failure.
• Update central cloud storage documentation to describe local audit-file handling.
How To Test
From the SEMOSS repository root, run:
mvn -Dtest=prerna.cluster.util.clients.CentralCloudStorageUnitTests test
Verify that the test output ends with:
Failures: 0, Errors: 0
BUILD SUCCESS
For an integration test in a clustered environment: