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

Allow table cache to be bypassed by ModelBean (#2359) #2362

Open
wants to merge 1 commit into
base: release/version6.14
Choose a base branch
from

Conversation

keith-ratcliffe
Copy link
Collaborator

@keith-ratcliffe keith-ratcliffe commented Apr 30, 2024

Depends on NationalSecurityAgency/datawave-accumulo-utils#14

The goal here is to allow certain ModelBean operations to be performed in a more timely manner. E.g., in order to replace a given query model, the current implementation requires that a user first perform a model DELETE operation and then wait for an asynchronous cache refresh, so that the subsequent model import can succeed. If the cache isn't fully refreshed, the import fails with an error, because the deleted model is still resident in the stale cache. That process can be drastically streamlined by simply allowing the table cache to be bypassed by an "admin" user

This PR also fixes a bug in the listModelNames method that misidentifies row: edge_key colf: version as a query model

@@ -86,7 +90,7 @@ public class ModelBean {
private static final long BATCH_WRITER_MAX_MEMORY = 10845760;
private static final int BATCH_WRITER_MAX_THREADS = 2;

private static final HashSet<String> RESERVED_COLF_VALUES = Sets.newHashSet("e", "i", "ri", "f", "tf", "m", "desc", "edge", "t", "n", "h");
private static final HashSet<String> RESERVED_COLF_VALUES = Sets.newHashSet("e", "i", "ri", "f", "tf", "m", "desc", "edge", "t", "n", "h", "version");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes a preexisting bug: listModelNames method erroneously returns "version" (i.e., colf of the "edge_key" row) as an existing model

@keith-ratcliffe keith-ratcliffe force-pushed the feature/bypassTableCache branch 2 times, most recently from b2ad0db to d61c1b6 Compare May 28, 2024 17:58
@keith-ratcliffe keith-ratcliffe added bug Something isn't working enhancement New feature or request labels May 28, 2024
@keith-ratcliffe keith-ratcliffe force-pushed the feature/bypassTableCache branch 8 times, most recently from 792c604 to c2e9015 Compare June 5, 2024 14:10
* Update accumulo-utils version
* Add ModelBean quickstart integration tests
* Address PR feedback:
  Extend '/import' to enable update/replace semantics via
  optional path parameter, i.e., '/import/{modelName}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModelBean should optionally allow table cache to be bypassed via WrappedAccumuloClient
2 participants