Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .github/workflows/ant-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# This workflow will test and build a Java project with Ant
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant

name: Gigapaxos test workflow
---
name: Gigapaxos Main Test Workflow

on:
push:
branches: [ "master" ]
branches: ["master"]
pull_request:
branches: [ "master" ]
branches: ["master"]

permissions: {}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'oracle'
- name: 🏗️ Compiling the source code into a jar archive ...
run: ant jar
- name: 🧪 Running tests with ant ...
run: ant test
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'oracle'
- name: 🏗️ Compiling the source code into a jar archive ...
run: ant jar
- name: 🧪 Running tests with ant ...
run: ant test
37 changes: 37 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will run linter checks on the codebase.
---
name: Gigapaxos Linter Workflow

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

permissions: {}

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0

- name: Setup linter
uses: super-linter/super-linter@v7.4.0
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_JSCPD: false
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions src/edu/umass/cs/gigapaxos/PaxosInstanceStateMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -2663,4 +2663,9 @@ protected int getCurrentPaxosCoordinator() {
return this.paxosState.getBallotCoord();
}

protected void tryToBeCoordinator() {
MessagingTask m = checkRunForCoordinator(true);
this.sendMessagingTask(m);
}

}
22 changes: 22 additions & 0 deletions src/edu/umass/cs/gigapaxos/PaxosManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3534,4 +3534,26 @@ public NodeIDType getPaxosCoordinator(String serviceName) {

return this.integerMap.get(pism.getCurrentPaxosCoordinator());
}

public void tryToBePaxosCoordinator(String paxosID) {
PaxosInstanceStateMachine pism = this.getInstance(paxosID);
if (pism == null) {
return;
}

pism.tryToBeCoordinator();
}

public void restartFromLastCheckpoint(String paxosID) {
PaxosInstanceStateMachine pism = this.getInstance(paxosID);
if (pism == null) {
return;
}

this.softCrash(pism);
pism = this.getInstance(paxosID);
assert pism != null :
"failed to restart as pism is failed to be re-created";
pism.poke(true);
}
}