-
Notifications
You must be signed in to change notification settings - Fork 30
Add Prefixed database Access [ECR-4159]: #1382
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
Add Prefixed database Access [ECR-4159]: #1382
Conversation
Modified the AbstractAccess to resolve addresses into numeric ids and then use the ids to cache indexes. That is required for correct operation of Prefixed accesses and will be fully tested when they are added. This patch requires the native code for operation, and currently does not pass tests.
Add the Prefixed access, that can be created either from a handle, or from the base access and the namespace. Clarify IndexAddress documentation and StorageIndex spec, to allow index pooling across Accesses.
03b7a21
to
f2b40a6
Compare
* Creates a Prefixed native peer given the base access native handle. | ||
* @throws RuntimeException if the base access is unsupported; or if the namespace is not valid | ||
*/ | ||
private static native long nativeCreate(String namespace, long accessNativeHandle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we usually use (handle, arguments....) order in native methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In create*
a handle is just an argument, it is not a handle to "this".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I guess it's the matter of taste
@AfterEach | ||
void dropDatabase() throws CloseFailuresException { | ||
try { | ||
cleaner.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPE if an exception occurs in creating db 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ed40b4f
to
d5daac9
Compare
Overview
Add the Prefixed access, that can be created either
from a handle, or from the base access and the namespace.
Clarify IndexAddress documentation and StorageIndex spec,
to allow index pooling across Accesses.
See: https://jira.bf.local/browse/ECR-4159
Definition of Done