Skip to content

Commit 033522e

Browse files
committed
Replace Read.countsFor[Node/Relationship]WithoutTxState with Read.estimateCountsFor[Node/Relationships]
see neo-technology/neo4j#23747
1 parent 532bddf commit 033522e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compatibility/5-common/neo4j-kernel-adapter/src/main/java17/org/neo4j/gds/compat/_5x/PartitionedStoreScan.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ public static List<StoreScan<NodeLabelIndexCursor>> createScans(
6666
// and use that one as the driving partitioned index scan. The partitions
6767
// of all other partitioned index scans will be aligned to that one.
6868
int maxToken = labelIds[0];
69-
long maxCount = read.countsForNodeWithoutTxState(labelIds[0]);
69+
long maxCount = read.estimateCountsForNode(labelIds[0]);
7070
int maxIndex = 0;
7171

7272
for (int i = 1; i < labelIds.length; i++) {
73-
long count = read.countsForNodeWithoutTxState(labelIds[i]);
73+
long count = read.estimateCountsForNode(labelIds[i]);
7474
if (count > maxCount) {
7575
maxCount = count;
7676
maxToken = labelIds[i];

native-projection/src/main/java/org/neo4j/gds/projection/GraphDimensionsReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ protected Map<RelationshipType, Long> getRelationshipCountsByType(
205205

206206
private static long relCountUpperBoundForLabelAndType(Read dataRead, int labelId, int id) {
207207
return Math.max(
208-
dataRead.countsForRelationshipWithoutTxState(labelId, id, ANY_LABEL),
209-
dataRead.countsForRelationshipWithoutTxState(ANY_LABEL, id, labelId)
208+
dataRead.estimateCountsForRelationships(labelId, id, ANY_LABEL),
209+
dataRead.estimateCountsForRelationships(ANY_LABEL, id, labelId)
210210
);
211211
}
212212

0 commit comments

Comments
 (0)