Skip to content

Commit

Permalink
#4682 PlanB State Store
Browse files Browse the repository at this point in the history
  • Loading branch information
stroomdev66 committed Jan 23, 2025
1 parent 56d0ca9 commit 1847c56
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 124 deletions.
33 changes: 33 additions & 0 deletions stroom-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -854,4 +854,37 @@ tasks.register('Stroom Node 2 (GWT Super Dev)', JavaExec) {
args = ['server', 'local2.yml']
}

tasks.register('Stroom Node 3 (GWT Super Dev)', JavaExec) {
doFirst {
// We have to alter the existing jvm args rather than set them so that we don't lose debug args added by
// IJ Idea.
def jvmArgsCopy = []
for (arg in jvmArgs) {
jvmArgsCopy.add(arg)
}
// -DgwtSuperDevMode=true
// -Xmx4g
// -Devent.logging.validate=true
// --add-opens java.base/java.nio=ALL-UNNAMED
// --add-opens java.base/sun.nio.ch=ALL-UNNAMED
// --add-opens java.base/java.lang=ALL-UNNAMED
jvmArgsCopy.add("-DgwtSuperDevMode=true")
jvmArgsCopy.add("-Xmx4g")
jvmArgsCopy.add("-Devent.logging.validate=true")
jvmArgsCopy.add("--add-opens")
jvmArgsCopy.add("java.base/java.nio=ALL-UNNAMED")
jvmArgsCopy.add("--add-opens")
jvmArgsCopy.add("java.base/sun.nio.ch=ALL-UNNAMED")
jvmArgsCopy.add("--add-opens")
jvmArgsCopy.add("java.base/java.lang=ALL-UNNAMED")
jvmArgs = jvmArgsCopy
}

group = 'application'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'stroom.app.App'
workingDir = '../'
args = ['server', 'local3.yml']
}

// vim: set tabstop=4 shiftwidth=4 expandtab:
11 changes: 10 additions & 1 deletion stroom-state/stroom-planb-impl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Each of these store types require data to be described in specific ways, however
<referenceData xmlns="reference-data:2" xmlns:evt="event-logging:3">
<reference>
<map>cityToCountry</map>
<time>2024-01-01T08:10:22.023Z</time> <!-- optional defaults to effective time -->
<key>cardiff</key>
<value>Wales</value>
</reference>
Expand All @@ -40,13 +41,21 @@ Each of these store types require data to be described in specific ways, however
<value>Cardiff</value>
</reference>

<!-- Ranged state -->
<!-- Ranged state using from/to numeric values -->
<reference>
<map>employeeIdToCountry</map>
<time>2024-01-01T08:10:22.023Z</time> <!-- optional defaults to effective time -->
<from>1001</from>
<to>1700</to>
<value>UK</value>
</reference>
<!-- Ranged state using key for specific numeric value -->
<reference>
<map>employeeIdToCountry</map>
<time>2024-01-01T08:10:22.023Z</time> <!-- optional defaults to effective time -->
<key>203</key>
<value>UK</value>
</reference>
...
</referenceData>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public SnapshotInstance(final ByteBufferFactory byteBufferFactory,
throw new RuntimeException("Unable to get snapshot shard for '" + doc + "'");
}
} catch (final Exception e) {
LOGGER.warn(e::getMessage, e);
LOGGER.debug(e::getMessage, e);
fetchException = new RuntimeException(e);
// If we have an exception then we will want to retry getting a snapshot so expire soon.
expiryTime = createTime.plus(configProvider.get().getSnapshotRetryFetchInterval());
Expand Down
Loading

0 comments on commit 1847c56

Please sign in to comment.