-
Notifications
You must be signed in to change notification settings - Fork 154
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
Conversation
"jetstream {", | ||
" domain: HUB", | ||
" store_dir: " + tempJsStoreDir(), |
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.
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) { |
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.
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, |
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.
use the constant
"jetstream {", | ||
" domain: LEAF", | ||
" store_dir: " + tempJsStoreDir(), | ||
" domain: " + LEAF_DOMAIN, |
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.
use the constant and store dir
String path3 = Files.createTempDirectory(variant()).toString().replace("\\", "\\\\"); | ||
String path1 = tempJsStoreDir(); | ||
String path2 = tempJsStoreDir(); | ||
String path3 = tempJsStoreDir(); |
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.
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()), |
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.
This was the fix/bug.
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.
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?
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.
LGTM
No description provided.