Skip to content

Commit 08cf1cd

Browse files
authored
fix!: DH-19970, DH-19958: Make it harder to accidentally create unpooled chunks, refactor pooling code to improve giving pattern, and make poolable capacities configurable (deephaven#7060)
1 parent 25d993c commit 08cf1cd

File tree

74 files changed

+1026
-1213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1026
-1213
lines changed

BenchmarkSupport/BenchmarkSupport.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ dependencies {
2525
testImplementation project(':engine-test-utils')
2626
testImplementation project(path: ':Base', configuration: 'tests')
2727

28-
testRuntimeOnly project(path: ':configs')
29-
testRuntimeOnly project(path: ':test-configs')
28+
testRuntimeOnly project(':configs')
29+
testRuntimeOnly project(':test-configs')
3030
testRuntimeOnly project(':Numerics')
3131

3232
testRuntimeOnly project(':log-to-slf4j')

ClientSupport/ClientSupport.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies {
1515
testImplementation libs.assertj
1616

1717
testRuntimeOnly project(':log-to-slf4j'),
18-
project(path: ':configs'),
19-
project(path: ':test-configs')
18+
project(':configs'),
19+
project(':test-configs')
2020
testRuntimeOnly libs.slf4j.simple
2121
}

Generators/Generators.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ dependencies {
2020
implementation libs.groovy
2121
implementation libs.groovy.json
2222

23-
runtimeOnly project(path: ':configs')
24-
runtimeOnly project(path: ':test-configs')
23+
runtimeOnly project(':configs')
24+
runtimeOnly project(':test-configs')
2525
runtimeOnly project(':extensions-kafka')
2626

2727
runtimeOnly project(':log-to-slf4j')
2828
runtimeOnly libs.logback.classic
2929

3030
testImplementation project(path: ':Base', configuration: 'tests')
3131

32-
testRuntimeOnly project(path: ':configs')
33-
testRuntimeOnly project(path: ':test-configs')
32+
testRuntimeOnly project(':configs')
33+
testRuntimeOnly project(':test-configs')
3434

3535
combinedJavadoc project(path: ':combined-javadoc', targetConfiguration: 'combinedJavadoc')
3636
}

Numerics/Numerics.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ dependencies {
1212

1313
testImplementation project(':base-test-utils')
1414
testImplementation project(path: ':Base', configuration: 'tests')
15-
testRuntimeOnly project(path: ':configs')
16-
testRuntimeOnly project(path: ':test-configs')
15+
testRuntimeOnly project(':configs')
16+
testRuntimeOnly project(':test-configs')
1717

18-
testRuntimeOnly project(':log-to-slf4j'),
19-
project(path: ':configs'),
20-
project(path: ':test-configs')
18+
testRuntimeOnly project(':log-to-slf4j')
2119
testRuntimeOnly libs.slf4j.simple
2220
}

TableLogger/TableLogger.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ dependencies {
66
implementation project(':Base')
77
implementation project(':Util')
88
implementation project(":util-pool")
9-
testRuntimeOnly project(path: ':configs')
10-
testRuntimeOnly project(path: ':test-configs')
9+
testRuntimeOnly project(':configs')
10+
testRuntimeOnly project(':test-configs')
1111

12-
runtimeOnly project(path: ':configs')
12+
runtimeOnly project(':configs')
1313

1414
testRuntimeOnly project(':log-to-slf4j')
1515
testRuntimeOnly libs.slf4j.simple

Util/Util.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dependencies {
1212

1313
implementation project(':Configuration')
1414

15-
testRuntimeOnly project(path: ':configs')
16-
testRuntimeOnly project(path: ':test-configs')
15+
testRuntimeOnly project(':configs')
16+
testRuntimeOnly project(':test-configs')
1717

1818
testRuntimeOnly project(':log-to-slf4j')
1919
testRuntimeOnly libs.slf4j.simple

engine/benchmark/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ dependencies {
2323
testAnnotationProcessor libs.jmh.generator.annprocess
2424
testCompileOnly libs.jmh.generator.annprocess
2525

26-
testRuntimeOnly project(path: ':configs')
27-
testRuntimeOnly project(path: ':test-configs')
26+
testRuntimeOnly project(':configs')
27+
testRuntimeOnly project(':test-configs')
2828
}
2929

3030
task jmhRun(type: JavaExec) {

engine/chunk/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ dependencies {
1010
api project(':Util')
1111
api project(':codec-api:')
1212
implementation project(':Base')
13+
implementation project(':Configuration')
1314

1415
testImplementation libs.junit4
1516

1617
testRuntimeOnly project(':log-to-slf4j')
17-
testRuntimeOnly project(path: ':configs')
18-
testRuntimeOnly project(path: ':test-configs')
18+
testRuntimeOnly project(':configs')
19+
testRuntimeOnly project(':test-configs')
1920
testRuntimeOnly libs.slf4j.simple
2021
}

engine/chunk/src/main/java/io/deephaven/chunk/ResettableBooleanChunk.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,11 @@ public static <ATTR_BASE extends Any> ResettableBooleanChunk<ATTR_BASE> makeRese
2727
return new ResettableBooleanChunk<>();
2828
}
2929

30-
public static <ATTR_BASE extends Any> ResettableBooleanChunk<ATTR_BASE> makeResettableChunkForPool() {
31-
return new ResettableBooleanChunk<>() {
32-
@Override
33-
public void close() {
34-
MultiChunkPool.forThisThread().giveResettableBooleanChunk(this);
35-
}
36-
};
37-
}
38-
3930
private ResettableBooleanChunk(boolean[] data, int offset, int capacity) {
4031
super(data, offset, capacity);
4132
}
4233

43-
private ResettableBooleanChunk() {
34+
protected ResettableBooleanChunk() {
4435
this(ArrayTypeUtils.EMPTY_BOOLEAN_ARRAY, 0, 0);
4536
}
4637

engine/chunk/src/main/java/io/deephaven/chunk/ResettableByteChunk.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,11 @@ public static <ATTR_BASE extends Any> ResettableByteChunk<ATTR_BASE> makeResetta
2727
return new ResettableByteChunk<>();
2828
}
2929

30-
public static <ATTR_BASE extends Any> ResettableByteChunk<ATTR_BASE> makeResettableChunkForPool() {
31-
return new ResettableByteChunk<>() {
32-
@Override
33-
public void close() {
34-
MultiChunkPool.forThisThread().giveResettableByteChunk(this);
35-
}
36-
};
37-
}
38-
3930
private ResettableByteChunk(byte[] data, int offset, int capacity) {
4031
super(data, offset, capacity);
4132
}
4233

43-
private ResettableByteChunk() {
34+
protected ResettableByteChunk() {
4435
this(ArrayTypeUtils.EMPTY_BYTE_ARRAY, 0, 0);
4536
}
4637

0 commit comments

Comments
 (0)