Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Neo4jsource
Commits
f368e0c2
Commit
f368e0c2
authored
9 years ago
by
Mattias Persson
Browse files
Options
Download
Plain Diff
Merge branch '2.3' into 3.0
parents
27061e4b
64422091
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
community/consistency-check/src/main/java/org/neo4j/consistency/checking/full/CountsBuilderDecorator.java
+13
-16
...o4j/consistency/checking/full/CountsBuilderDecorator.java
with
13 additions
and
16 deletions
+13
-16
community/consistency-check/src/main/java/org/neo4j/consistency/checking/full/CountsBuilderDecorator.java
+
13
-
16
View file @
f368e0c2
...
...
@@ -126,8 +126,8 @@ class CountsBuilderDecorator extends CheckDecorator.Adapter
{
this
.
storeAccess
=
storeAccess
;
this
.
nodeStore
=
storeAccess
.
getRawNeoStores
().
getNodeStore
();
this
.
nodeCountBuildCondition
=
new
MultiPassAvoidanceCondition
<>();
this
.
relationshipCountBuildCondition
=
new
MultiPassAvoidanceCondition
<>();
this
.
nodeCountBuildCondition
=
new
MultiPassAvoidanceCondition
<>(
0
);
this
.
relationshipCountBuildCondition
=
new
MultiPassAvoidanceCondition
<>(
1
);
}
@Override
...
...
@@ -333,28 +333,25 @@ class CountsBuilderDecorator extends CheckDecorator.Adapter
private
static
class
MultiPassAvoidanceCondition
<
T
extends
AbstractBaseRecord
>
implements
Predicate
<
T
>
{
private
boolean
used
;
private
boolean
done
;
// Stage which this condition is active, starting from 0, mimicing the CheckStage ordinal
private
final
int
activeStage
;
// The same thread updates this every time, the TaskExecutor. Other threads read it
private
volatile
int
stage
=
-
1
;
public
MultiPassAvoidanceCondition
(
int
activeStage
)
{
this
.
activeStage
=
activeStage
;
}
public
void
prepare
()
{
if
(
used
)
{
done
=
true
;
}
stage
++;
}
@Override
public
boolean
test
(
T
record
)
{
try
{
return
!
done
;
}
finally
{
used
=
true
;
}
return
stage
==
activeStage
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help