Skip to content

Commit 3349322

Browse files
2 parents dd0feb9 + a0dc6f8 commit 3349322

228 files changed

Lines changed: 9495 additions & 1653 deletions

File tree

Some content is hidden

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

.build/checkstyle.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@
5858
</module>
5959

6060
<module name="SuppressWithNearbyCommentFilter">
61-
<property name="commentFormat" value="checkstyle: permit this invocation"/>
62-
<property name="idFormat" value="blockPathToFile"/>
63-
<property name="influenceFormat" value="0"/>
61+
<property name="commentFormat" value="checkstyle: permit this invocation"/>
62+
<property name="idFormat" value="blockInstantNow|blockPathToFile|blockToCases"/>
63+
<property name="influenceFormat" value="0"/>
6464
</module>
6565

6666
<module name="SuppressWithNearbyCommentFilter">
6767
<property name="commentFormat" value="checkstyle: permit this invocation"/>
68-
<property name="idFormat" value="blockToCases"/>
68+
<property name="idFormat" value="blockInstantNow"/>
6969
<property name="influenceFormat" value="0"/>
7070
</module>
7171

.build/git/git-hooks/post-checkout/100-update-submodules.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ _main() {
3131
root_dir="$(git rev-parse --show-toplevel)"
3232
cd "$root_dir"
3333

34-
if [[ ! -e .gitmodules ]]; then
34+
if ! git ls-files --error-unmatch .gitmodules &>/dev/null; then
3535
# nothing to see here, look away!
3636
return 0
3737
fi
38-
git submodule update --init --recursive
38+
39+
local extra_args=""
40+
if [[ -n "${BUILD_OFFLINE:-}" ]]; then
41+
echo "BUILD_OFFLINE is defined; using --no-fetch for submodule updates (local SHAs only)."
42+
echo "If your submodules are not already available locally, expect this to error out."
43+
extra_args="--no-fetch"
44+
fi
45+
git submodule update --init --recursive ${extra_args:-}
3946
}
4047

4148
_main "$@"

.build/git/git-hooks/pre-commit/100-verify-submodules-pushed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ _main() {
6060
root_dir="$(git rev-parse --show-toplevel)"
6161
cd "$root_dir"
6262

63-
[[ ! -e .gitmodules ]] && return 0
63+
git ls-files --error-unmatch .gitmodules &>/dev/null || return 0
6464
local enabled=$(git config --bool cassandra.pre-commit.verify-submodules.enabled || echo true)
6565
[ "$enabled" == "false" ] && return 0
6666
local submodules=( $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') )

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
6.0-alpha2
2+
* Add an offline cluster metadata tool (CASSANDRA-19151)
3+
* Accord: Tail Latency Improvements (CASSANDRA-21361)
4+
* Artificial Latency Injection (CASSANDRA-17024)
5+
* Accord: Clean Shutdown/Restart, Rebootstrap, et al (CASSANDRA-21355)
26
* Reduce memory allocations in SelectStatement.getQuery (CASSANDRA-21351)
37
* Avoid allocation by getFunctions in SelectStatement.authorize (CASSANDRA-21347)
48
* Avoid unit conversion in DatabaseDescriptor.getMaxValueSize() for every deserializing Cell (CASSANDRA-21295)
@@ -21,6 +25,7 @@
2125
* Fix a removed TTLed row re-appearance in a materialized view after a cursor compaction (CASSANDRA-21152)
2226
* Rework ZSTD dictionary compression logic to create a trainer per training (CASSANDRA-21209)
2327
Merged from 5.0:
28+
* Use estimated compressed size for tables to check if there is enough free space for a compaction (CASSANDRA-21245)
2429
* Fix failing select on system_views.settings for non-string keys (CASSANDRA-21348)
2530
* Ensure SAI sends range tombstones to the coordinator for queries on static columns (CASSANDRA-21332)
2631
Merged from 4.1:

modules/accord

Submodule accord updated 159 files

src/java/org/apache/cassandra/cache/AutoSavingCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ else if (cacheType == CacheService.CacheType.COUNTER_CACHE)
330330
type,
331331
0,
332332
keysEstimate,
333+
keysEstimate,
333334
Unit.KEYS,
334335
nextTimeUUID(),
335336
getCacheDataPath(CURRENT_VERSION).toPath().toString());
@@ -344,7 +345,8 @@ public CompactionInfo getCompactionInfo()
344345
{
345346
// keyset can change in size, thus total can too
346347
// TODO need to check for this one... was: info.forProgress(keysWritten, Math.max(keysWritten, keys.size()));
347-
return info.forProgress(keysWritten, Math.max(keysWritten, keysEstimate));
348+
long totalKeys = Math.max(keysWritten, keysEstimate);
349+
return info.forProgress(keysWritten, totalKeys, totalKeys);
348350
}
349351

350352
public void saveCache()

src/java/org/apache/cassandra/concurrent/ExecutorLocals.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
public class ExecutorLocals implements WithResources, Closeable
3535
{
36-
private static final ExecutorLocals none = new ExecutorLocals(null, null);
36+
private static final ExecutorLocals none = new ExecutorLocals(null, null, false);
3737
private static final FastThreadLocal<ExecutorLocals> locals = new FastThreadLocal<ExecutorLocals>()
3838
{
3939
@Override
@@ -45,20 +45,23 @@ protected ExecutorLocals initialValue()
4545

4646
public static class Impl
4747
{
48-
protected static void set(TraceState traceState, ClientWarn.State clientWarnState)
48+
@SuppressWarnings("resource")
49+
protected static void set(TraceState traceState, ClientWarn.State clientWarnState, boolean eligibleForArtificialLatency)
4950
{
50-
if (traceState == null && clientWarnState == null) locals.set(none);
51-
else locals.set(new ExecutorLocals(traceState, clientWarnState));
51+
if (traceState == null && clientWarnState == null && !eligibleForArtificialLatency) locals.set(none);
52+
else locals.set(new ExecutorLocals(traceState, clientWarnState, eligibleForArtificialLatency));
5253
}
5354
}
5455

5556
public final TraceState traceState;
5657
public final ClientWarn.State clientWarnState;
58+
public final boolean eligibleForArtificialLatency;
5759

58-
protected ExecutorLocals(TraceState traceState, ClientWarn.State clientWarnState)
60+
protected ExecutorLocals(TraceState traceState, ClientWarn.State clientWarnState, boolean eligibleForArtificialLatency)
5961
{
6062
this.traceState = traceState;
6163
this.clientWarnState = clientWarnState;
64+
this.eligibleForArtificialLatency = eligibleForArtificialLatency;
6265
}
6366

6467
/**
@@ -82,7 +85,7 @@ public static WithResources propagate()
8285
public static ExecutorLocals create(TraceState traceState)
8386
{
8487
ExecutorLocals current = locals.get();
85-
return current.traceState == traceState ? current : new ExecutorLocals(traceState, current.clientWarnState);
88+
return current.traceState == traceState ? current : new ExecutorLocals(traceState, current.clientWarnState, current.eligibleForArtificialLatency);
8689
}
8790

8891
public static void clear()

0 commit comments

Comments
 (0)