This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-hugegraph-computer.git


The following commit(s) were added to refs/heads/master by this push:
     new ad2240a7 improve(algorithm): random walk vertex inactive (#301)
ad2240a7 is described below

commit ad2240a76e6253488b688ba270421699c70bb04d
Author: diaohancai <[email protected]>
AuthorDate: Mon Jan 15 19:15:51 2024 +0800

    improve(algorithm): random walk vertex inactive (#301)
---
 .github/workflows/ci.yml                                              | 2 +-
 .github/workflows/codeql-analysis.yml                                 | 2 +-
 .github/workflows/license-checker.yml                                 | 2 +-
 .../org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java  | 4 ++++
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5cfd38a1..dae11ce4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,7 +11,7 @@ jobs:
   computer-ci:
     runs-on: ubuntu-latest
     env:
-      USE_STAGE: 'true' # Whether to include the stage repository.
+      USE_STAGE: 'false' # Whether to include the stage repository.
       TRAVIS_DIR: computer-dist/src/assembly/travis
       KUBERNETES_VERSION: 1.20.1
       BSP_ETCD_URL: http://localhost:2579
diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index 32bebd0a..607c2060 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -12,7 +12,7 @@ on:
 jobs:
   analyze:
     env:
-      USE_STAGE: 'true' # Whether to include the stage repository.
+      USE_STAGE: 'false' # Whether to include the stage repository.
     name: Analyze
     runs-on: ubuntu-latest
     permissions:
diff --git a/.github/workflows/license-checker.yml 
b/.github/workflows/license-checker.yml
index 5d5c8c0c..18eddbae 100644
--- a/.github/workflows/license-checker.yml
+++ b/.github/workflows/license-checker.yml
@@ -40,7 +40,7 @@ jobs:
     runs-on: ubuntu-latest
     env:
       SCRIPT_DEPENDENCY: computer-dist/scripts/dependency
-      USE_STAGE: 'true' # Whether to include the stage repository.
+      USE_STAGE: 'false' # Whether to include the stage repository.
     steps:
       - name: Checkout source
         uses: actions/checkout@v4
diff --git 
a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java
 
b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java
index a74cd488..6401de4f 100644
--- 
a/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java
+++ 
b/computer-algorithm/src/main/java/org/apache/hugegraph/computer/algorithm/sampling/RandomWalk.java
@@ -194,6 +194,8 @@ public class RandomWalk implements 
Computation<RandomWalkMessage> {
             Edge selectedEdge = this.randomSelectEdge(null, null, 
vertex.edges());
             context.sendMessage(selectedEdge.targetId(), message);
         }
+
+        vertex.inactivate();
     }
 
     @Override
@@ -244,6 +246,8 @@ public class RandomWalk implements 
Computation<RandomWalkMessage> {
                                                       vertex.edges());
             context.sendMessage(selectedEdge.targetId(), message);
         }
+
+        vertex.inactivate();
     }
 
     /**

Reply via email to