-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent Any Storage Errors from Clobbering aZKS Entry (#432)
* Prevent Any Storage Errors from Clobbering aZKS Entry **Current** -- Prior to this patch, AKD would incorrectly assume that any error during initialization of a `Directory` should result in an `aZKS` being created and stored in the underlying database implementation. The problem here is that this behavior happened on every error, even those which do not definitively indicate that the read for an `aZKS` passed but a record was not found. For example, if a connection issue occurs when connecting to the storage layer, the current implementation could wrongly overwrite an existing `aZKS`. In such a scenario, the original read for the `aZKS` fails during `Directory` initialization, but a subsequent write succeeds. This can result in clobbered records and unexpected behavior. **Proposed/New** -- With this change, we update the initialization logic for the `Directory` type to only create an `aZKS` if the returned `Err` indicates that the read was successful, but an `aZKS` was not found. In all other instances, we propagate the `Err` back to the caller instead of swallowing it and wrongly creating an `aZKS`. * Prepare for 0.12.0-pre.3 Release --------- Co-authored-by: Dillon George <[email protected]>
- Loading branch information
Showing
8 changed files
with
59 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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