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

Object Store use over leaf-hub domain #1160

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Object Store use over leaf-hub domain #1160

merged 3 commits into from
Jun 17, 2024

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Jun 17, 2024

No description provided.

"jetstream {",
" domain: HUB",
" store_dir: " + tempJsStoreDir(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

specify a unique store dir for each server

@@ -225,7 +225,7 @@ private ObjectInfo validateObjectInfo(ObjectInfo oi, String bucket, String objec
}

@SuppressWarnings("SameParameterValue")
private static Object[] getInput(int size) throws IOException {
private static Object[] getInput(int size) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exception isn't thrown

@@ -290,19 +290,21 @@ public static void runInJsHubLeaf(TwoServerTest twoServerTest) throws Exception
int leafPort = NatsTestServer.nextPort();

String[] hubInserts = new String[] {
"server_name: HUB",
"server_name: " + HUB_DOMAIN,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use the constant

"jetstream {",
" domain: LEAF",
" store_dir: " + tempJsStoreDir(),
" domain: " + LEAF_DOMAIN,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use the constant and store dir

String path3 = Files.createTempDirectory(variant()).toString().replace("\\", "\\\\");
String path1 = tempJsStoreDir();
String path2 = tempJsStoreDir();
String path3 = tempJsStoreDir();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

refactored since I made a function

@@ -232,8 +232,7 @@ public ObjectInfo get(String objectName, OutputStream out) throws IOException, J
out.write(data);
}
else {

JetStreamSubscription sub = js.subscribe(pubSubChunkSubject(oi.getNuid()),
JetStreamSubscription sub = js.subscribe(rawChunkSubject(oi.getNuid()),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the fix/bug.

Choose a reason for hiding this comment

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

is it only problematic to use the pubSubChunkSubject on gets or does it cause problems everywhere? I ask because I had issues with puts and deletes on the HUB object store from the leaf as well. Maybe you could try deleting and putting a file from the leaf in your handy unit test below and see what happens?

Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit c17c25e into main Jun 17, 2024
2 checks passed
@scottf scottf deleted the object-store-domain branch June 17, 2024 20:14
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.

3 participants