-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the circular initialization dependency
ModifierType and TypeDefinitionCategory has circular initialization dependency, as a result, if we access ModifierType before TypeDefinitionCategory, it will cause java.lang.ExceptionInInitializerError problem. Signed-off-by: Hongjiang Zhang <timerzhj@hotmail.com> Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
- Loading branch information
Showing
2 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
janusgraph-core/src/test/java/org/janusgraph/graphdb/TestModifierType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2024 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package org.janusgraph.graphdb; | ||
|
||
import org.janusgraph.graphdb.database.management.ModifierType; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
public class TestModifierType { | ||
// Verify whether the circular initialization dependency was resolved for ModifierType and TypeDefinitionCategory | ||
@Test | ||
public void testLoadModifierType() { | ||
try { | ||
ModifierType m = ModifierType.CONSISTENCY; | ||
assert(m != null); | ||
} catch (Exception | Error e) { | ||
fail("Fail to access ModifierType"); | ||
} | ||
} | ||
} |
c6107eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
org.janusgraph.JanusGraphSpeedBenchmark.basicAddAndDelete
12295.156941339628
ms/op12548.841765768664
ms/op0.98
org.janusgraph.GraphCentricQueryBenchmark.getVertices
903.5802897012413
ms/op908.9160965066542
ms/op0.99
org.janusgraph.MgmtOlapJobBenchmark.runClearIndex
216.33660728224635
ms/op215.56932801666667
ms/op1.00
org.janusgraph.MgmtOlapJobBenchmark.runReindex
319.964782675
ms/op322.9509254536765
ms/op0.99
org.janusgraph.JanusGraphSpeedBenchmark.basicCount
222.01878575112306
ms/op212.78665196498793
ms/op1.04
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesAllPropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection
4632.917002772849
ms/op4698.239144101103
ms/op0.99
org.janusgraph.CQLMultiQueryBenchmark.getElementsWithUsingEmitRepeatSteps
15829.243578562615
ms/op15966.206554570066
ms/op0.99
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithSmallBatch
18619.692658172728
ms/op19081.16261119033
ms/op0.98
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.vertexCentricPropertiesFetching
56960.12680766666
ms/op55375.80740896666
ms/op1.03
org.janusgraph.CQLMultiQueryBenchmark.getAllElementsTraversedFromOuterVertex
7700.384339122431
ms/op7708.374268012084
ms/op1.00
org.janusgraph.CQLMultiQueryBenchmark.getVerticesWithDoubleUnion
389.200313735011
ms/op381.9027326485772
ms/op1.02
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesAllPropertiesWithUnlimitedBatch
3897.7539913294536
ms/op3899.8398211893646
ms/op1.00
org.janusgraph.CQLMultiQueryBenchmark.getNames
7792.019788588782
ms/op7815.098555887045
ms/op1.00
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesThreePropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection
5583.0753742424995
ms/op5666.585976946075
ms/op0.99
org.janusgraph.CQLMultiQueryBenchmark.getLabels
6688.495842699634
ms/op6658.275468181763
ms/op1.00
org.janusgraph.CQLMultiQueryBenchmark.getVerticesFilteredByAndStep
435.6212790902633
ms/op428.13637674948495
ms/op1.02
org.janusgraph.CQLMultiQueryBenchmark.getVerticesFromMultiNestedRepeatStepStartingFromSingleVertex
12466.50983828627
ms/op12269.209682924633
ms/op1.02
org.janusgraph.CQLMultiQueryBenchmark.getVerticesWithCoalesceUsage
361.9563685191202
ms/op360.9079409445181
ms/op1.00
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection
13282.331091806089
ms/op13979.482008851768
ms/op0.95
org.janusgraph.CQLMultiQueryBenchmark.getIdToOutVerticesProjection
248.60737930444378
ms/op246.77816763466674
ms/op1.01
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithUnlimitedBatch
13656.281012292666
ms/op14415.369742636307
ms/op0.95
org.janusgraph.CQLMultiQueryBenchmark.getNeighborNames
7746.402406432287
ms/op7710.845519076539
ms/op1.00
org.janusgraph.CQLMultiQueryBenchmark.getElementsWithUsingRepeatUntilSteps
8462.58426607407
ms/op8551.481096059784
ms/op0.99
org.janusgraph.CQLMultiQueryBenchmark.getAdjacentVerticesLocalCounts
8010.610553759605
ms/op8050.205522232533
ms/op1.00
This comment was automatically generated by workflow using github-action-benchmark.