Skip to content

Commit ad2240a

Browse files
authored
improve(algorithm): random walk vertex inactive (#301)
1 parent 6c07251 commit ad2240a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
computer-ci:
1212
runs-on: ubuntu-latest
1313
env:
14-
USE_STAGE: 'true' # Whether to include the stage repository.
14+
USE_STAGE: 'false' # Whether to include the stage repository.
1515
TRAVIS_DIR: computer-dist/src/assembly/travis
1616
KUBERNETES_VERSION: 1.20.1
1717
BSP_ETCD_URL: http://localhost:2579

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
analyze:
1414
env:
15-
USE_STAGE: 'true' # Whether to include the stage repository.
15+
USE_STAGE: 'false' # Whether to include the stage repository.
1616
name: Analyze
1717
runs-on: ubuntu-latest
1818
permissions:

.github/workflows/license-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
env:
4242
SCRIPT_DEPENDENCY: computer-dist/scripts/dependency
43-
USE_STAGE: 'true' # Whether to include the stage repository.
43+
USE_STAGE: 'false' # Whether to include the stage repository.
4444
steps:
4545
- name: Checkout source
4646
uses: actions/checkout@v4

computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ public void compute0(ComputationContext context, Vertex vertex) {
194194
Edge selectedEdge = this.randomSelectEdge(null, null, vertex.edges());
195195
context.sendMessage(selectedEdge.targetId(), message);
196196
}
197+
198+
vertex.inactivate();
197199
}
198200

199201
@Override
@@ -244,6 +246,8 @@ public void compute(ComputationContext context, Vertex vertex,
244246
vertex.edges());
245247
context.sendMessage(selectedEdge.targetId(), message);
246248
}
249+
250+
vertex.inactivate();
247251
}
248252

249253
/**

0 commit comments

Comments
 (0)