Skip to content

Commit

Permalink
better config. just model for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Dec 26, 2023
1 parent 918309d commit 1170241
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
cache: 'maven'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Maven
run: mvn -batch-mode clean install -Ppre --file pom.xml
run: mvn -batch-mode clean install -rf model -Ppre --file pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void before() throws Exception {
var localRouter = new LocalServer(prefix, member).router(ServerConnectionCache.newBuilder().setTarget(30));
var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1),
checkpointDirBase, Duration.ofMillis(10), 0.00125,
Duration.ofMinutes(1), 10);
Duration.ofMinutes(1), 3, 10, 0.1);
var node = new ProcessContainerDomain(group, member, pdParams, params, RuntimeParameters.newBuilder()
.setFoundation(
sealed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ public ProcessDomain(Digest group, ControlledIdentifierMember member, ProcessDom
Builder builder, Parameters.RuntimeParameters.Builder runtime, InetSocketAddress endpoint,
com.salesforce.apollo.fireflies.Parameters.Builder ff, StereotomyMetrics stereotomyMetrics) {
super(member, builder, parameters.dbURL, parameters.checkpointBaseDir, runtime);
var base = Context.<Participant>newBuilder().setId(group).build();
var base = Context.<Participant>newBuilder()
.setBias(parameters.dhtBias)
.setpByz(parameters.dhtPbyz)
.setId(group)
.build();
final var dhtUrl = String.format("jdbc:h2:mem:%s-%s;DB_CLOSE_DELAY=-1", member.getId(), "");
JdbcConnectionPool connectionPool = JdbcConnectionPool.create(dhtUrl, "", "");
connectionPool.setMaxConnections(10);
Expand Down Expand Up @@ -120,7 +124,6 @@ protected void stopServices() {

public record ProcessDomainParameters(String dbURL, Duration dhtOperationsTimeout, Path checkpointBaseDir,
Duration dhtOpsFrequency, double dhtFpr, Duration dhtEventValidTO,
int jdbcMaxConnections) {

int dhtBias, int jdbcMaxConnections, double dhtPbyz) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void before() throws Exception {
routers.add(localRouter);
var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1),
checkpointDirBase, Duration.ofMillis(10), 0.00125,
Duration.ofMinutes(1), 10);
Duration.ofMinutes(1), 3, 10, 0.1);
var domain = new ProcessContainerDomain(group, member, pdParams, params, RuntimeParameters.newBuilder()
.setFoundation(
sealed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void before() throws Exception {
routers.add(localRouter);
var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1),
checkpointDirBase, Duration.ofMillis(10), 0.00125,
Duration.ofMinutes(1), 10);
Duration.ofMinutes(1), 3, 10, 0.1);
var domain = new ProcessDomain(group, member, pdParams, params, RuntimeParameters.newBuilder()
.setFoundation(sealed)
.setContext(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public void before() throws Exception {
var context = new ContextImpl<>(DigestAlgorithm.DEFAULT.getLast(), CARDINALITY, 0.2, 3);
final var member = new ControlledIdentifierMember(id);
var localRouter = new LocalServer(prefix, member).router(ServerConnectionCache.newBuilder().setTarget(30));
var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofMinutes(1),
var pdParams = new ProcessDomain.ProcessDomainParameters("jdbc:h2:mem:", Duration.ofSeconds(5),
checkpointDirBase, Duration.ofMillis(10), 0.00125,
Duration.ofMinutes(1), 10);
Duration.ofSeconds(5), 3, 10, 0.1);
var node = new ProcessDomain(group, member, pdParams, params, RuntimeParameters.newBuilder()
.setFoundation(sealed)
.setContext(context)
Expand Down
2 changes: 1 addition & 1 deletion model/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<appender-ref ref="STDOUT"/>
</logger>

<logger name="com.salesforce.apollo.fireflies" level="info" additivity="false">
<logger name="com.salesforce.apollo.fireflies" level="trace" additivity="false">
<appender-ref ref="STDOUT"/>
</logger>

Expand Down

0 comments on commit 1170241

Please sign in to comment.