You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sm...@apache.org on 2024/05/02 21:53:56 UTC

(cassandra) branch trunk updated (1d04457a24 -> 41a4a26651)

This is an automated email from the ASF dual-hosted git repository.

smiklosovic pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


    from 1d04457a24 Merge branch 'cassandra-5.0' into trunk
     add 326bf4b3f5 Resolve the oldest hints just from descriptors and current writer if available
     new 41a4a26651 Merge branch 'cassandra-5.0' into trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt                                        |  1 +
 .../org/apache/cassandra/hints/HintsBuffer.java    | 38 ++-------
 .../apache/cassandra/hints/HintsBufferPool.java    | 26 ------
 .../cassandra/hints/HintsDispatchTrigger.java      |  2 -
 .../org/apache/cassandra/hints/HintsService.java   | 24 ++----
 .../org/apache/cassandra/hints/HintsStore.java     | 27 ++++--
 .../apache/cassandra/hints/HintsWriteExecutor.java | 32 ++++---
 .../org/apache/cassandra/service/StorageProxy.java |  6 +-
 ...WindowTest.java => AbstractHintWindowTest.java} | 96 ++++-----------------
 .../distributed/test/HintsMaxWindowTest.java       | 88 +------------------
 .../test/HintsPersistentWindowTest.java            | 99 ++++++++++++++++++++++
 .../apache/cassandra/hints/HintsBufferTest.java    | 47 ----------
 .../apache/cassandra/hints/HintsServiceTest.java   | 48 -----------
 13 files changed, 171 insertions(+), 363 deletions(-)
 copy test/distributed/org/apache/cassandra/distributed/test/{HintsMaxWindowTest.java => AbstractHintWindowTest.java} (51%)
 create mode 100644 test/distributed/org/apache/cassandra/distributed/test/HintsPersistentWindowTest.java


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


(cassandra) 01/01: Merge branch 'cassandra-5.0' into trunk

Posted by sm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 41a4a266515f9462c28dd1c28f5791506f7653b6
Merge: 1d04457a24 326bf4b3f5
Author: Stefan Miklosovic <sm...@apache.org>
AuthorDate: Thu May 2 23:32:29 2024 +0200

    Merge branch 'cassandra-5.0' into trunk

 CHANGES.txt                                        |  1 +
 .../org/apache/cassandra/hints/HintsBuffer.java    | 38 ++-------
 .../apache/cassandra/hints/HintsBufferPool.java    | 26 ------
 .../cassandra/hints/HintsDispatchTrigger.java      |  2 -
 .../org/apache/cassandra/hints/HintsService.java   | 24 ++----
 .../org/apache/cassandra/hints/HintsStore.java     | 27 ++++--
 .../apache/cassandra/hints/HintsWriteExecutor.java | 32 ++++---
 .../org/apache/cassandra/service/StorageProxy.java |  6 +-
 ...WindowTest.java => AbstractHintWindowTest.java} | 96 ++++-----------------
 .../distributed/test/HintsMaxWindowTest.java       | 88 +------------------
 .../test/HintsPersistentWindowTest.java            | 99 ++++++++++++++++++++++
 .../apache/cassandra/hints/HintsBufferTest.java    | 47 ----------
 .../apache/cassandra/hints/HintsServiceTest.java   | 48 -----------
 13 files changed, 171 insertions(+), 363 deletions(-)

diff --cc CHANGES.txt
index 40a5161ff5,5a53faf257..168f40d224
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,41 -1,5 +1,42 @@@
 -5.0-beta2
 +5.1
 + * Reduce heap usage occupied by the metrics (CASSANDRA-19567)
 + * Improve handling of transient replicas during range movements (CASSANDRA-19344)
 + * Enable debounced internode log requests to be cancelled at shutdown (CASSANDRA-19514)
 + * Correctly set last modified epoch when combining multistep operations into a single step (CASSANDRA-19538)
 + * Add new TriggersPolicy configuration to allow operators to disable triggers (CASSANDRA-19532)
 + * Use Transformation.Kind.id in local and distributed log tables (CASSANDRA-19516)
 + * Remove period field from ClusterMetadata and metadata log tables (CASSANDRA-19482)
 + * Enrich system_views.pending_hints vtable with hints sizes (CASSANDRA-19486)
 + * Expose all dropwizard metrics in virtual tables (CASSANDRA-14572)
 + * Ensured that PropertyFileSnitchTest do not overwrite cassandra-toploogy.properties (CASSANDRA-19502)
 + * Add option for MutualTlsAuthenticator to restrict the certificate validity period (CASSANDRA-18951)
 + * Fix StorageService::constructRangeToEndpointMap for non-distributed keyspaces (CASSANDRA-19255)
 + * Group nodetool cms commands into single command group (CASSANDRA-19393)
 + * Register the measurements of the bootstrap process as Dropwizard metrics (CASSANDRA-19447)
 + * Add LIST SUPERUSERS CQL statement (CASSANDRA-19417)
 + * Modernize CQLSH datetime conversions (CASSANDRA-18879)
 + * Harry model and in-JVM tests for partition-restricted 2i queries (CASSANDRA-18275)
 + * Refactor cqlshmain global constants (CASSANDRA-19201)
 + * Remove native_transport_port_ssl (CASSANDRA-19397)
 + * Make nodetool reconfigurecms sync by default and add --cancel to be able to cancel ongoing reconfigurations (CASSANDRA-19216)
 + * Expose auth mode in system_views.clients, nodetool clientstats, metrics (CASSANDRA-19366)
 + * Remove sealed_periods and last_sealed_period tables (CASSANDRA-19189)
 + * Improve setup and initialisation of LocalLog/LogSpec (CASSANDRA-19271)
 + * Refactor structure of caching metrics and expose auth cache metrics via JMX (CASSANDRA-17062)
 + * Allow CQL client certificate authentication to work without sending an AUTHENTICATE request (CASSANDRA-18857)
 + * Extend nodetool tpstats and system_views.thread_pools with detailed pool parameters (CASSANDRA-19289)
 + * Remove dependency on Sigar in favor of OSHI (CASSANDRA-16565)
 + * Simplify the bind marker and Term logic (CASSANDRA-18813)
 + * Limit cassandra startup to supported JDKs, allow higher JDKs by setting CASSANDRA_JDK_UNSUPPORTED (CASSANDRA-18688)
 + * Standardize nodetool tablestats formatting of data units (CASSANDRA-19104)
 + * Make nodetool tablestats use number of significant digits for time and average values consistently (CASSANDRA-19015)
 + * Upgrade jackson to 2.15.3 and snakeyaml to 2.1 (CASSANDRA-18875)
 + * Transactional Cluster Metadata [CEP-21] (CASSANDRA-18330)
 + * Add ELAPSED command to cqlsh (CASSANDRA-18861)
 + * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
 + * Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787)
 +Merged from 5.0:
+  * Resolve the oldest hints just from descriptors and current writer if available (CASSANDRA-19600)
   * Optionally fail writes when SAI refuses to index a term value exceeding configured term max size (CASSANDRA-19493)
   * Vector search can restrict on clustering keys when filtering isn't required (CASSANDRA-19544)
   * Fix FBUtilities' parsing of gcp cos_containerd kernel versions (CASSANDRA-18594)
diff --cc src/java/org/apache/cassandra/hints/HintsStore.java
index e36e041760,969f37ae7f..cb3d67b8af
--- a/src/java/org/apache/cassandra/hints/HintsStore.java
+++ b/src/java/org/apache/cassandra/hints/HintsStore.java
@@@ -127,32 -119,30 +127,51 @@@ final class HintsStor
              queueSize++;
          }
  
 -        if (queueSize == 0)
 +        int corruptedFilesCount = 0;
 +        long corruptedFilesSize = 0;
 +
 +        Iterator<HintsDescriptor> corruptedDescriptors = corruptedFiles.iterator();
 +        while (corruptedDescriptors.hasNext())
 +        {
 +            HintsDescriptor corruptedDescriptor = corruptedDescriptors.next();
 +            try
 +            {
 +                corruptedFilesSize += corruptedDescriptor.hintsFileSize(hintsDirectory);
 +            }
 +            catch (Exception ex)
 +            {
 +                // the logic behind this is that if a descriptor was added among corrupted, it was done so in a catch,
 +                // so it is probable that if we ask its size it would throw again, just to be super sure we do not ruin
 +                // whole query, lets just wrap it in a try-catch
 +            }
 +            corruptedFilesCount++;
 +        }
 +
 +        if (queueSize == 0 && corruptedFilesCount == 0)
              return null;
 -        return new PendingHintsInfo(hostId, queueSize, minTimestamp, maxTimestamp);
 +        return new PendingHintsInfo(hostId, queueSize, minTimestamp, maxTimestamp,
 +                                    totalSize, corruptedFilesCount, corruptedFilesSize);
      }
  
+     /**
+      * Find the oldest hint written for a particular node by looking into descriptors
+      * and current open writer, if any.
+      *
+      * @return the oldest hint as per unix time or Long.MAX_VALUE if not present
+      */
+     public long findOldestHintTimestamp()
+     {
+         HintsDescriptor desc = dispatchDequeue.peekFirst();
+         if (desc != null)
+             return desc.timestamp;
+ 
+         HintsWriter writer = getWriter();
+         if (writer != null)
+             return writer.descriptor().timestamp;
+ 
+         return Long.MAX_VALUE;
+     }
+ 
      boolean isLive()
      {
          InetAddressAndPort address = address();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org