Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Fixed server alloc caching issue
Browse files Browse the repository at this point in the history
Node Allocation list is stored locally but wouldn't update when a server is created. So sometimes you will try to create a server with an allocation already used.
  • Loading branch information
Raft08 committed Jan 14, 2024
1 parent 24a85ec commit 6871f08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ private synchronized void initialize() {
}

public synchronized void sync() {
this.alloc = this.node.retrieveAllocations().execute();
this.node = this.application.retrieveNodeById(this.config.remoteIdentifier).execute();
this.alloc = this.node.retrieveAllocations().cache(false).execute();
this.specifications.setAllocations(this.alloc.size());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public FutureAction<NetworkServer> execute() {
selectedNode = this.findNode();
} catch (NoSuchNodeException e) {
future.fail(e);
return;
}
else {
if (!this.setNodeCanRunServer()) {
Expand Down

0 comments on commit 6871f08

Please sign in to comment.