[cassandra] branch trunk updated: Refactor internals of cqlsh.py to cqlshlib
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 The following commit(s) were added to refs/heads/trunk by this push: new ecceb446e0 Refactor internals of cqlsh.py to cqlshlib ecceb446e0 is described below commit ecceb446e00ea9e567ba45f1b422cb04862ef044 Author: Brad Schoening <5796692+bschoen...@users.noreply.github.com> AuthorDate: Wed Sep 14 14:28:10 2022 +0300 Refactor internals of cqlsh.py to cqlshlib patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams for CASSANDRA-17531 --- bin/cqlsh.py| 2321 +-- bin/cqlsh.py => pylib/cqlshlib/cqlshmain.py | 170 +- 2 files changed, 61 insertions(+), 2430 deletions(-) diff --git a/bin/cqlsh.py b/bin/cqlsh.py index 9a561eb200..7e6db9bdb8 100755 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -16,26 +16,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import cmd -import codecs -import configparser -import csv -import errno -import getpass -import optparse import os import platform -import re -import stat -import subprocess import sys -import traceback -import warnings -import webbrowser -from contextlib import contextmanager from glob import glob -from io import StringIO -from uuid import UUID if sys.version_info < (3, 6): sys.exit("\ncqlsh requires Python 3.6+\n") @@ -44,50 +28,9 @@ if sys.version_info < (3, 6): if platform.python_implementation().startswith('Jython'): sys.exit("\nCQL Shell does not run on Jython\n") -UTF8 = 'utf-8' - -description = "CQL Shell for Apache Cassandra" -version = "6.2.0" - -readline = None -try: -# check if tty first, cause readline doesn't check, and only cares -# about $TERM. we don't want the funky escape code stuff to be -# output if not a tty. -if sys.stdin.isatty(): -import readline -except ImportError: -pass - CQL_LIB_PREFIX = 'cassandra-driver-internal-only-' CASSANDRA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') -CASSANDRA_CQL_HTML_FALLBACK = 'https://cassandra.apache.org/doc/latest/cql/index.html' - -# default location of local CQL.html -if os.path.exists(CASSANDRA_PATH + '/doc/cql3/CQL.html'): -# default location of local CQL.html -CASSANDRA_CQL_HTML = 'file://' + CASSANDRA_PATH + '/doc/cql3/CQL.html' -elif os.path.exists('/usr/share/doc/cassandra/CQL.html'): -# fallback to package file -CASSANDRA_CQL_HTML = 'file:///usr/share/doc/cassandra/CQL.html' -else: -# fallback to online version -CASSANDRA_CQL_HTML = CASSANDRA_CQL_HTML_FALLBACK - -# On Linux, the Python webbrowser module uses the 'xdg-open' executable -# to open a file/URL. But that only works, if the current session has been -# opened from _within_ a desktop environment. I.e. 'xdg-open' will fail, -# if the session's been opened via ssh to a remote box. -# -try: -webbrowser.register_standard_browsers() # registration is otherwise lazy in Python3 -except AttributeError: -pass -if webbrowser._tryorder and webbrowser._tryorder[0] == 'xdg-open' and os.environ.get('XDG_DATA_DIRS', '') == '': -# only on Linux (some OS with xdg-open) -webbrowser._tryorder.remove('xdg-open') -webbrowser._tryorder.append('xdg-open') # use bundled lib for python-cql if available. if there # is a ../lib dir, use bundled libs there preferentially. @@ -120,7 +63,6 @@ for lib in third_parties: if lib_zip: sys.path.insert(0, lib_zip) -warnings.filterwarnings("ignore", r".*blist.*") try: import cassandra except ImportError as e: @@ -130,14 +72,6 @@ except ImportError as e: 'Module load path: %r\n\n' 'Error: %s\n' % (sys.executable, sys.path, e)) -from cassandra.auth import PlainTextAuthProvider -from cassandra.cluster import Cluster -from cassandra.cqltypes import cql_typename -from cassandra.marshal import int64_unpack -from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata, TableMetadata) -from cassandra.policies import WhiteListRoundRobinPolicy -from cassandra.query import SimpleStatement, ordered_dict_factory, TraceUnavailable -from cassandra.util import datetime_from_timestamp # cqlsh should run correctly when run out of a Cassandra source tree, # out of an unpacked Cassandra tarball, and after a proper package install. @@ -145,2261 +79,10 @@ cqlshlibdir = os.path.join(CASSANDRA_PATH, 'pylib') if os.path.isdir(cqlshlibdir): sys.path.insert(0, cqlshlibdir) -from cqlshlib import cql3handling, pylexotron, sslhandling, cqlshhandling, authproviderhandling -from cqlshlib.copyutil import ExportTask, ImportTask -from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN, - RED, WHITE, FormattedValue, colorme) -from cqlshlib.formatting import (DEFAULT_DATE_FORMAT,
[jira] [Updated] (CASSANDRA-17876) remove the unused imports in the source code
[ https://issues.apache.org/jira/browse/CASSANDRA-17876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-17876: -- Change Category: Code Clarity Complexity: Low Hanging Fruit Fix Version/s: 4.1-beta 4.2 Status: Open (was: Triage Needed) > remove the unused imports in the source code > > > Key: CASSANDRA-17876 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17876 > Project: Cassandra > Issue Type: Improvement > Components: Build >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 4.1-beta, 4.2 > > Time Spent: 40m > Remaining Estimate: 0h > > remove the unused imports in the source code -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17876) remove the unused imports in the source code
[ https://issues.apache.org/jira/browse/CASSANDRA-17876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608133#comment-17608133 ] Stefan Miklosovic commented on CASSANDRA-17876: --- Hi [~maoling] I have added the skip here https://github.com/instaclustr/cassandra/commit/76fe7248fcb077251f8cf368454d4287c13aec44 I think we need to apply this patch for 4.1 as well as for trunk. cassandra-4.1 branch is the one which introduced checkstyle targets. It does not make sense to apply this fix to trunk only. I will start to implement this for cassandra-4.1 as well. Please let me know if you are on it in the meanwhile. I have a feeling that the original author of this patch is not responsive anymore. If nothing happens in forseeable future I shall take over. > remove the unused imports in the source code > > > Key: CASSANDRA-17876 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17876 > Project: Cassandra > Issue Type: Improvement > Components: Build >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 4.1-beta, 4.2 > > Time Spent: 40m > Remaining Estimate: 0h > > remove the unused imports in the source code -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17876) remove the unused imports in the source code
[ https://issues.apache.org/jira/browse/CASSANDRA-17876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608133#comment-17608133 ] Stefan Miklosovic edited comment on CASSANDRA-17876 at 9/22/22 8:14 AM: Hi [~maoling] I have added the skip here https://github.com/instaclustr/cassandra/commit/76fe7248fcb077251f8cf368454d4287c13aec44 I think we need to apply this patch for 4.1 as well as for trunk. cassandra-4.1 branch is the one which introduced checkstyle targets. It does not make sense to apply this fix to trunk only. I will start to implement this for cassandra-4.1 as well. Please let me know if you are on it in the meanwhile. I have a feeling that the original author of this patch is not responsive anymore. If nothing happens in forseeable future I shall take over. EDIT: we have unused imports in tests as well. I propose to cleanup tests too and introduce the check with optional skipping while developing as well. was (Author: smiklosovic): Hi [~maoling] I have added the skip here https://github.com/instaclustr/cassandra/commit/76fe7248fcb077251f8cf368454d4287c13aec44 I think we need to apply this patch for 4.1 as well as for trunk. cassandra-4.1 branch is the one which introduced checkstyle targets. It does not make sense to apply this fix to trunk only. I will start to implement this for cassandra-4.1 as well. Please let me know if you are on it in the meanwhile. I have a feeling that the original author of this patch is not responsive anymore. If nothing happens in forseeable future I shall take over. > remove the unused imports in the source code > > > Key: CASSANDRA-17876 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17876 > Project: Cassandra > Issue Type: Improvement > Components: Build >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 4.1-beta, 4.2 > > Time Spent: 40m > Remaining Estimate: 0h > > remove the unused imports in the source code -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17531) Refactor python code from bin to pylib
[ https://issues.apache.org/jira/browse/CASSANDRA-17531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-17531: -- Status: Ready to Commit (was: Review In Progress) > Refactor python code from bin to pylib > -- > > Key: CASSANDRA-17531 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17531 > Project: Cassandra > Issue Type: Task > Components: CQL/Interpreter >Reporter: Brad Schoening >Assignee: Brad Schoening >Priority: Normal > Fix For: 4.x > > > The cassandra/bin directory consists of only executable shell scripts, except > for 2000+ lines of Python code in cqlsh.py. This code would be reuseable if > refactored to cassandra/pylib. > We'll retain a minimal runner cqlsh.py. > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17531) Refactor python code from bin to pylib
[ https://issues.apache.org/jira/browse/CASSANDRA-17531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-17531: -- Fix Version/s: 4.2 (was: 4.x) Source Control Link: https://github.com/apache/cassandra/commit/ecceb446e00ea9e567ba45f1b422cb04862ef044 Resolution: Fixed Status: Resolved (was: Ready to Commit) > Refactor python code from bin to pylib > -- > > Key: CASSANDRA-17531 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17531 > Project: Cassandra > Issue Type: Task > Components: CQL/Interpreter >Reporter: Brad Schoening >Assignee: Brad Schoening >Priority: Normal > Fix For: 4.2 > > > The cassandra/bin directory consists of only executable shell scripts, except > for 2000+ lines of Python code in cqlsh.py. This code would be reuseable if > refactored to cassandra/pylib. > We'll retain a minimal runner cqlsh.py. > -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17915) Confusing error message when using ? with functions
[ https://issues.apache.org/jira/browse/CASSANDRA-17915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608141#comment-17608141 ] Benjamin Lerer commented on CASSANDRA-17915: The error message is unclear and should be changed to 'use type hints to disambiguate'. > Confusing error message when using ? with functions > --- > > Key: CASSANDRA-17915 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17915 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: David Capwell >Priority: Normal > > {code} > INSERT INTO %S (a, b, c) VALUES (? + 1, ?, ?) > {code} > Errors saying > {code} > Ambiguous '+' operation with args ? and 1: use type casts to disambiguate > {code} > Now, if you google “type casts CQL” you get > https://docs.datastax.com/en/dse/5.1/cql/cql/cql_reference/refCqlFunction.html > which says to do > {code} > CAST( selector AS to_type ) > {code} > But this also fails! > {code} > InvalidRequestException: Ambiguous call to function system.castAsFloat (can > be matched by following signatures: system."castAsFloat" : (bigint) -> float, > system."castAsFloat" : (counter) -> float, system."castAsFloat" : (double) -> > float, system."castAsFloat" : (int) -> float, system."castAsFloat" : > (tinyint) -> float, system."castAsFloat" : (varint) -> float, > system."castAsFloat" : (decimal) -> float, system."castAsFloat" : (smallint) > -> float): use type casts to disambiguate > {code} > What we have to do is > {code} > INSERT INTO %S (a, b, c) VALUES ((int) ? + 1, ?, ?) > {code} > We should improve the error message to show the expected syntax (or fix CAST > to work in this case). -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[cassandra-website] branch asf-staging updated (1bb9037e0 -> f218237cf)
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a change to branch asf-staging in repository https://gitbox.apache.org/repos/asf/cassandra-website.git discard 1bb9037e0 generate docs for 538513bd new f218237cf generate docs for 538513bd This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (1bb9037e0) \ N -- N -- N refs/heads/asf-staging (f218237cf) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. 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: site-ui/build/ui-bundle.zip | Bin 4740078 -> 4740078 bytes 1 file changed, 0 insertions(+), 0 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[cassandra-website] branch asf-staging updated (f218237cf -> 55acea68c)
This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a change to branch asf-staging in repository https://gitbox.apache.org/repos/asf/cassandra-website.git discard f218237cf generate docs for 538513bd new 55acea68c generate docs for 538513bd This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (f218237cf) \ N -- N -- N refs/heads/asf-staging (55acea68c) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. 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: site-ui/build/ui-bundle.zip | Bin 4740078 -> 4740078 bytes 1 file changed, 0 insertions(+), 0 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17885) Add solution for CASSANDRA-17581 to older branches for tests
[ https://issues.apache.org/jira/browse/CASSANDRA-17885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608320#comment-17608320 ] Brandon Williams commented on CASSANDRA-17885: -- I've pushed a fix to install the nodetool hack on any version below 3.0.27, which now catches the 3.0.17 version the upgrade tests are using. > Add solution for CASSANDRA-17581 to older branches for tests > > > Key: CASSANDRA-17885 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17885 > Project: Cassandra > Issue Type: Bug > Components: Tool/nodetool >Reporter: Brandon Williams >Assignee: Brandon Williams >Priority: Normal > Fix For: 3.0.28, 3.11.14, 4.1-beta, 4.1 > > > Some of our tests use old branches for the purposes of testing upgrades and > behavior in mixed versions, but those lacking CASSANDRA-17581 will fail on > nodetool with a modern JDK. We can port this fix to those branches and > adjust the tests to use the newest version of them to solve this going > forward. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[cassandra] branch trunk updated: Deprecate Throwables.propagate usage
This is an automated email from the ASF dual-hosted git repository. maedhroz pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git The following commit(s) were added to refs/heads/trunk by this push: new 7adfdc85cf Deprecate Throwables.propagate usage 7adfdc85cf is described below commit 7adfdc85cf5c1cb505e6507e5c08de84834c2224 Author: Claude Warren, Jr AuthorDate: Fri Jul 22 08:56:13 2022 +0100 Deprecate Throwables.propagate usage patch by Claude Warren; reviewed by Caleb Rackliffe and David Capwell for CASSANDRA-14218 --- CHANGES.txt | 1 + src/java/org/apache/cassandra/cache/ChunkCache.java | 6 -- src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 15 ++- .../apache/cassandra/db/SnapshotDetailsTabularData.java | 2 +- .../db/compaction/CompactionHistoryTabularData.java | 2 +- src/java/org/apache/cassandra/db/compaction/Scrubber.java | 3 +-- src/java/org/apache/cassandra/db/compaction/Upgrader.java | 3 ++- src/java/org/apache/cassandra/db/compaction/Verifier.java | 3 ++- src/java/org/apache/cassandra/db/memtable/Flushing.java | 4 +++- src/java/org/apache/cassandra/hints/Hint.java | 3 ++- .../apache/cassandra/io/compress/CompressionMetadata.java | 3 +-- .../org/apache/cassandra/io/sstable/ISSTableScanner.java | 3 ++- .../cassandra/io/sstable/SSTableSimpleUnsortedWriter.java | 5 - .../apache/cassandra/io/sstable/SSTableSimpleWriter.java | 4 +++- src/java/org/apache/cassandra/io/util/FileUtils.java | 3 +-- .../cassandra/repair/consistent/admin/CleanupSummary.java | 5 ++--- .../cassandra/repair/consistent/admin/PendingStat.java| 5 ++--- .../cassandra/repair/consistent/admin/PendingStats.java | 5 ++--- .../cassandra/repair/consistent/admin/RepairStats.java| 9 - .../apache/cassandra/streaming/StreamTransferTask.java| 6 -- .../streaming/management/ProgressInfoCompositeData.java | 8 +++- .../management/SessionCompleteEventCompositeData.java | 6 ++ .../streaming/management/SessionInfoCompositeData.java| 7 +++ .../streaming/management/StreamStateCompositeData.java| 5 ++--- .../streaming/management/StreamSummaryCompositeData.java | 6 ++ src/java/org/apache/cassandra/tools/LoaderOptions.java| 3 +-- .../org/apache/cassandra/tools/SSTableOfflineRelevel.java | 3 ++- src/java/org/apache/cassandra/utils/WrappedRunnable.java | 8 +--- .../cassandra/test/microbench/instance/ReadTest.java | 6 -- .../test/microbench/instance/SimpleTableWriter.java | 6 -- .../apache/cassandra/simulator/paxos/PaxosSimulation.java | 5 +++-- test/unit/org/apache/cassandra/cql3/MemtableSizeTest.java | 3 ++- test/unit/org/apache/cassandra/net/SocketUtils.java | 6 ++ .../utils/bytecomparable/ByteSourceTestBase.java | 4 +--- 34 files changed, 88 insertions(+), 78 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1d82239c10..f49d5f2e1e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.2 + * Deprecate Throwables.propagate usage (CASSANDRA-14218) * Allow disabling hotness persistence for high sstable counts (CASSANDRA-17868) * Prevent NullPointerException when changing neverPurgeTombstones from true to false (CASSANDRA-17897) * Add metrics around storage usage and compression (CASSANDRA-17898) diff --git a/src/java/org/apache/cassandra/cache/ChunkCache.java b/src/java/org/apache/cassandra/cache/ChunkCache.java index 51dbdc6694..cb05005a31 100644 --- a/src/java/org/apache/cassandra/cache/ChunkCache.java +++ b/src/java/org/apache/cassandra/cache/ChunkCache.java @@ -238,8 +238,10 @@ public class ChunkCache } catch (Throwable t) { -Throwables.propagateIfInstanceOf(t.getCause(), CorruptSSTableException.class); -throw Throwables.propagate(t); +if (t.getCause() instanceof CorruptSSTableException) +throw (CorruptSSTableException)t.getCause(); +Throwables.throwIfUnchecked(t); +throw new RuntimeException(t); } } diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 118069b38d..af3b8d13c9 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -174,7 +174,6 @@ import org.apache.cassandra.utils.concurrent.OpOrder; import org.apache.cassandra.utils.concurrent.Refs; import org.apache.cassandra.utils.concurrent.UncheckedInterruptedException; -import static com.google.common.base.Throwables.propagate; import static org.apache.cassandra.concurrent.ExecutorFactory.Global.executorFactory; import static org.apache.cassandra.config.DatabaseDescriptor.getFlushWriters; import static
[jira] [Updated] (CASSANDRA-14218) Deprecate Throwables.propagate usage
[ https://issues.apache.org/jira/browse/CASSANDRA-14218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Caleb Rackliffe updated CASSANDRA-14218: Fix Version/s: 4.2 (was: 4.x) Source Control Link: https://github.com/apache/cassandra/commit/7adfdc85cf5c1cb505e6507e5c08de84834c2224 Resolution: Fixed Status: Resolved (was: Ready to Commit) Committed in https://github.com/apache/cassandra/commit/7adfdc85cf5c1cb505e6507e5c08de84834c2224 > Deprecate Throwables.propagate usage > > > Key: CASSANDRA-14218 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14218 > Project: Cassandra > Issue Type: Improvement > Components: Dependencies >Reporter: Romain Hardouin >Assignee: Claude Warren >Priority: Low > Labels: lhf > Fix For: 4.2 > > Attachments: 14218-trunk.txt, 14218-trunk.txt, CASSANDRA-14218.txt > > Time Spent: 1h 10m > Remaining Estimate: 0h > > Google decided to deprecate guava {{Throwables.propagate}} method: > * [Why we deprecated > Throwables.propagate|https://github.com/google/guava/wiki/Why-we-deprecated-Throwables.propagate] > * [Documentation > update|https://github.com/google/guava/wiki/ThrowablesExplained/_compare/92190ee7e37d334fa5fcdb6db8d0f43a2fdf02e1...226a3060445716d479981e606f589c99eee517ca] > We have 35 occurences in the trunk: > {code:java} > $ rg -c 'Throwables.propagate' * > src/java/org/apache/cassandra/streaming/StreamReader.java:1 > src/java/org/apache/cassandra/streaming/StreamTransferTask.java:1 > src/java/org/apache/cassandra/db/SnapshotDetailsTabularData.java:1 > src/java/org/apache/cassandra/db/Memtable.java:1 > src/java/org/apache/cassandra/db/ColumnFamilyStore.java:4 > src/java/org/apache/cassandra/cache/ChunkCache.java:2 > src/java/org/apache/cassandra/utils/WrappedRunnable.java:1 > src/java/org/apache/cassandra/hints/Hint.java:1 > src/java/org/apache/cassandra/tools/LoaderOptions.java:1 > src/java/org/apache/cassandra/tools/SSTableOfflineRelevel.java:1 > src/java/org/apache/cassandra/streaming/management/ProgressInfoCompositeData.java:3 > src/java/org/apache/cassandra/streaming/management/StreamStateCompositeData.java:2 > src/java/org/apache/cassandra/streaming/management/StreamSummaryCompositeData.java:2 > src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java:1 > src/java/org/apache/cassandra/db/compaction/Scrubber.java:1 > src/java/org/apache/cassandra/db/compaction/Verifier.java:1 > src/java/org/apache/cassandra/db/compaction/CompactionHistoryTabularData.java:1 > src/java/org/apache/cassandra/db/compaction/Upgrader.java:1 > src/java/org/apache/cassandra/io/compress/CompressionMetadata.java:1 > src/java/org/apache/cassandra/streaming/management/SessionCompleteEventCompositeData.java:2 > src/java/org/apache/cassandra/io/sstable/SSTableSimpleWriter.java:1 > src/java/org/apache/cassandra/io/sstable/ISSTableScanner.java:1 > src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java:3 > src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java:1 > {code} > I don't know if we want to remove all usages but we should at least check > author's intention for each usage and refactor if needed. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17912) Fix CircleCI config for running Python upgrade tests on 3.0 and 3.11
[ https://issues.apache.org/jira/browse/CASSANDRA-17912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608355#comment-17608355 ] Ekaterina Dimitrova commented on CASSANDRA-17912: - On a second pass and also while reading into the upgrade_manifest and CASSANDRA-16238, it seems we are running the right tests. Now I think the issue is Jenkins not running udtfix tests but I think why they are skipped can be tackled separately? I think this is ready for review, to summarize: -[3.0 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/f99cff0621d00a86992dddecd9b6046b72086170] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1939/workflows/c06f6aeb-48b0-42d5-8952-af814341e782] -[3.11 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/7f4d236dacffa9a587eb8b783b118869a6f0e5be] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1940/workflows/b822932d-e171-4490-b794-f1d35deee5d9] [~mck] , [~dcapwell] , anyone of you for review? I can open a follow up ticket for Jenkins. -- And some good news - the 3.0 upgrade tests run in Circle CI was brought from 1 hour 25 minutes to 47 minutes. -- Tried to run those locally and I am puzzled: {code:java} $pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level="DEBUG" --cassandra-dir=./cassandra upgrade_udtfix_test.py -rxXs test session starts = platform darwin -- Python 3.8.13, pytest-3.6.4, py-1.9.0, pluggy-0.7.1 rootdir: /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d, inifile: pytest.ini plugins: flaky-3.7.0, timeout-1.4.2, repeat-0.9.1 timeout: 900.0s timeout method: signal timeout func_only: False collected 20 items upgrade_udtfix_test.py [100%] == short test summary info === SKIP [16] upgrade_tests/upgrade_udtfix_test.py: test not applicable to env. SKIP [2] /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d/conftest.py: 3.0.27 < 3.11.6 SKIP [2] /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d/conftest.py: 3.0.28 < 3.11.6 = 20 skipped in 4.66 seconds = {code} This is with plain cassandra-3.11 and also with the patched branch. Double-checked the build.xml version and it is correct... >From the test class: {code:java} for path in build_upgrade_pairs(): gen_class_name = UpgradeUDTFixTest.__name__ + '_' + path.name assert gen_class_name not in globals() spec = {'UPGRADE_PATH': path, '__test__': True} start_family = spec['UPGRADE_PATH'].starting_meta.family upgrade_family = spec['UPGRADE_PATH'].upgrade_meta.family start_family_applies = start_family == CASSANDRA_3_0 upgrade_applies_to_env = RUN_STATIC_UPGRADE_MATRIX or start_family_applies cls = type(gen_class_name, (UpgradeUDTFixTest,), spec) if not upgrade_applies_to_env: add_skip(cls, 'test not applicable to env.') globals()[gen_class_name] = cls {code} Anyway, I think those should be run for 3.11? I can add more info to a follow up ticket for Jenkins. In a quick check I didn't see us setting for example RUN_STATIC_UPGRADE_MATRIX neither in CircleCI, nor in Jenkins. (I was trying to find out where the difference came from). I am not sure also how the version check can fail locally but not in CircleCI? And why at all fails... > Fix CircleCI config for running Python upgrade tests on 3.0 and 3.11 > > > Key: CASSANDRA-17912 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17912 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Assignee: Ekaterina Dimitrova >Priority: Normal > Fix For: 3.0.x, 3.11.x > > >
[jira] [Updated] (CASSANDRA-17912) Fix CircleCI config for running Python upgrade tests on 3.0 and 3.11
[ https://issues.apache.org/jira/browse/CASSANDRA-17912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ekaterina Dimitrova updated CASSANDRA-17912: Test and Documentation Plan: -[3.0 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/f99cff0621d00a86992dddecd9b6046b72086170] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1939/workflows/c06f6aeb-48b0-42d5-8952-af814341e782] -[3.11 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/7f4d236dacffa9a587eb8b783b118869a6f0e5be] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1940/workflows/b822932d-e171-4490-b794-f1d35deee5d9] Status: Patch Available (was: In Progress) > Fix CircleCI config for running Python upgrade tests on 3.0 and 3.11 > > > Key: CASSANDRA-17912 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17912 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Assignee: Ekaterina Dimitrova >Priority: Normal > Fix For: 3.0.x, 3.11.x > > > It was noticed that Circle CI pushes to run irrelevant for 3.0 and 3.11 > Python upgrade tests. Those are properly skipped in Jenkins. > Example runs: > [CircleCI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1931/workflows/39ef5261-a6bf-4e77-a412-e750e322a231/jobs/15293] > - 3.0 run > [Jenkins|https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1944/] > - while typing this I actually noticed [one > test|https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1944/testReport/junit/dtest-upgrade.upgrade_tests.upgrade_through_versions_test/TestProtoV3Upgrade_AllVersions_RandomPartitioner_EndsAt_3_11_X_HEAD/test_parallel_upgrade_with_internode_ssl/] > only looking suspicious in Jenkins as it ends the upgrade in 3.11 when we > test 3.0... > This is good to be fixed for two reasons - reduce the noise so we do not miss > legit failures and we should not spend resources to try to run those tests. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17912) Fix CircleCI config for running Python upgrade tests on 3.0 and 3.11
[ https://issues.apache.org/jira/browse/CASSANDRA-17912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608355#comment-17608355 ] Ekaterina Dimitrova edited comment on CASSANDRA-17912 at 9/22/22 5:07 PM: -- On a second pass and also while reading into the upgrade_manifest and CASSANDRA-16328, it seems we are running the right tests. Now I think the issue is Jenkins not running udtfix tests but I think why they are skipped can be tackled separately? I think this is ready for review, to summarize: -[3.0 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/f99cff0621d00a86992dddecd9b6046b72086170] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1939/workflows/c06f6aeb-48b0-42d5-8952-af814341e782] -[3.11 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/7f4d236dacffa9a587eb8b783b118869a6f0e5be] [CI|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1940/workflows/b822932d-e171-4490-b794-f1d35deee5d9] [~mck] , [~dcapwell] , anyone of you for review? I can open a follow up ticket for Jenkins. -- And some good news - the 3.0 upgrade tests run in Circle CI was brought from 1 hour 25 minutes to 47 minutes. -- Tried to run those locally and I am puzzled: {code:java} $pytest --execute-upgrade-tests-only --upgrade-target-version-only --upgrade-version-selection all --log-level="DEBUG" --cassandra-dir=./cassandra upgrade_udtfix_test.py -rxXs test session starts = platform darwin -- Python 3.8.13, pytest-3.6.4, py-1.9.0, pluggy-0.7.1 rootdir: /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d, inifile: pytest.ini plugins: flaky-3.7.0, timeout-1.4.2, repeat-0.9.1 timeout: 900.0s timeout method: signal timeout func_only: False collected 20 items upgrade_udtfix_test.py [100%] == short test summary info === SKIP [16] upgrade_tests/upgrade_udtfix_test.py: test not applicable to env. SKIP [2] /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d/conftest.py: 3.0.27 < 3.11.6 SKIP [2] /Users/ekaterina.dimitri/IdeaProjects/cassandra-dtest-d/conftest.py: 3.0.28 < 3.11.6 = 20 skipped in 4.66 seconds = {code} This is with plain cassandra-3.11 and also with the patched branch. Double-checked the build.xml version and it is correct... >From the test class: {code:java} for path in build_upgrade_pairs(): gen_class_name = UpgradeUDTFixTest.__name__ + '_' + path.name assert gen_class_name not in globals() spec = {'UPGRADE_PATH': path, '__test__': True} start_family = spec['UPGRADE_PATH'].starting_meta.family upgrade_family = spec['UPGRADE_PATH'].upgrade_meta.family start_family_applies = start_family == CASSANDRA_3_0 upgrade_applies_to_env = RUN_STATIC_UPGRADE_MATRIX or start_family_applies cls = type(gen_class_name, (UpgradeUDTFixTest,), spec) if not upgrade_applies_to_env: add_skip(cls, 'test not applicable to env.') globals()[gen_class_name] = cls {code} Anyway, I think those should be run for 3.11? I can add more info to a follow up ticket for Jenkins. In a quick check I didn't see us setting for example RUN_STATIC_UPGRADE_MATRIX neither in CircleCI, nor in Jenkins. (I was trying to find out where the difference came from). I am not sure also how the version check can fail locally but not in CircleCI? And why at all fails... was (Author: e.dimitrova): On a second pass and also while reading into the upgrade_manifest and CASSANDRA-16238, it seems we are running the right tests. Now I think the issue is Jenkins not running udtfix tests but I think why they are skipped can be tackled separately? I think this is ready for review, to summarize: -[3.0 patch|https://github.com/ekaterinadimitrova2/cassandra/commit/f99cff0621d00a86992dddecd9b6046b72086170] [CI|https://app.
[jira] [Commented] (CASSANDRA-17679) Make resumable bootstrap feature optional
[ https://issues.apache.org/jira/browse/CASSANDRA-17679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608362#comment-17608362 ] Josh McKenzie commented on CASSANDRA-17679: --- Implemented changes as per proposal by Paulo. ||Item|Link|| |PR|[link|https://github.com/apache/cassandra/pull/1873]| |JDK8 CI|[link|https://app.circleci.com/pipelines/github/josh-mckenzie/cassandra/304/workflows/56483dad-850f-43f0-8cd3-48e18f2b7236]| |JDK11 CI|[link|https://app.circleci.com/pipelines/github/josh-mckenzie/cassandra/304/workflows/8af97895-9b28-4c0f-ab45-a397ad4ae12c]| Follow up tickets to create once we're done here: # Make "-Dcassandra.reset_bootstrap_progress=true" clear existing bootstrap data as it would make this feature more reliable # Something else to consider is what to do with "nodetool rebuild". It also uses the data from the progress table. > Make resumable bootstrap feature optional > - > > Key: CASSANDRA-17679 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17679 > Project: Cassandra > Issue Type: New Feature > Components: Consistency/Streaming >Reporter: Josh McKenzie >Assignee: Josh McKenzie >Priority: Normal > Fix For: 4.x > > Time Spent: 20m > Remaining Estimate: 0h > > From the patch I'm working on: > {code} > # In certain environments, operators may want to disable resumable bootstrap > in order to avoid potential correctness > # violations or data loss scenarios. Largely this centers around nodes going > down during bootstrap, tombstones being > # written, and potential races with repair. By default we leave this on as > it's been enabled for quite some time, > # however the option to disable it is more palatable now that we have zero > copy streaming as that greatly accelerates > # bootstraps. This defaults to true. > # resumable_bootstrap_enabled: true > {code} > Not really a great fit for guardrails as it's less a "feature to be toggled > on and off" and more a subset of a specific feature that in certain > circumstances can lead to issues. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17896) Failed replacements due to "Cannot replace token xxx which does not exist"
[ https://issues.apache.org/jira/browse/CASSANDRA-17896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh McKenzie updated CASSANDRA-17896: -- Status: Open (was: Patch Available) > Failed replacements due to "Cannot replace token xxx which does not exist" > -- > > Key: CASSANDRA-17896 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17896 > Project: Cassandra > Issue Type: Bug > Components: Consistency/Streaming >Reporter: Josh McKenzie >Assignee: Josh McKenzie >Priority: Normal > Fix For: 4.x > > > Host replacements require host ID and token, however reporting of this info > is typically blocked when the “status” field is missing. We should expose a > system env (-D) param to advanced operators to have the ability to specify > the replace_addresses_token to be used during host replacement in cases where > Gossip gets into a bad state. > Given this is inherently an unsafe / high risk manual intervention, we want > to avoid promoting this to being a config param however Gossip quite often > contorts into problematic split-brain states like this and having the ability > to manually override things helps unstick host replacements that go > straddled. Should update NEWS.txt at the very least and consider > documentation as well > This is an interim solution that'll be obviated by CEP-21, but is still > useful on existing clusters. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17896) Failed replacements due to "Cannot replace token xxx which does not exist"
[ https://issues.apache.org/jira/browse/CASSANDRA-17896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Josh McKenzie updated CASSANDRA-17896: -- Resolution: Won't Fix Status: Resolved (was: Open) Closing as won't fix. This will be resolved by CEP-21 and is a pretty risky process for end users to run and have access to without understanding token allocation and the internals of Gossip. In the event someone runs into this problem, leaving the branch [here|https://github.com/josh-mckenzie/cassandra/tree/CASSANDRA-17896/trunk] as reference. > Failed replacements due to "Cannot replace token xxx which does not exist" > -- > > Key: CASSANDRA-17896 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17896 > Project: Cassandra > Issue Type: Bug > Components: Consistency/Streaming >Reporter: Josh McKenzie >Assignee: Josh McKenzie >Priority: Normal > Fix For: 4.x > > > Host replacements require host ID and token, however reporting of this info > is typically blocked when the “status” field is missing. We should expose a > system env (-D) param to advanced operators to have the ability to specify > the replace_addresses_token to be used during host replacement in cases where > Gossip gets into a bad state. > Given this is inherently an unsafe / high risk manual intervention, we want > to avoid promoting this to being a config param however Gossip quite often > contorts into problematic split-brain states like this and having the ability > to manually override things helps unstick host replacements that go > straddled. Should update NEWS.txt at the very least and consider > documentation as well > This is an interim solution that'll be obviated by CEP-21, but is still > useful on existing clusters. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17876) remove the unused imports in the source code and fail builds when they are present
[ https://issues.apache.org/jira/browse/CASSANDRA-17876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Miklosovic updated CASSANDRA-17876: -- Summary: remove the unused imports in the source code and fail builds when they are present (was: remove the unused imports in the source code) > remove the unused imports in the source code and fail builds when they are > present > -- > > Key: CASSANDRA-17876 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17876 > Project: Cassandra > Issue Type: Improvement > Components: Build >Reporter: Ling Mao >Assignee: Ling Mao >Priority: Normal > Fix For: 4.1-beta, 4.2 > > Time Spent: 40m > Remaining Estimate: 0h > > remove the unused imports in the source code -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-17918) DESCRIBE output does not quote column names using reserved keywords
Yifan Cai created CASSANDRA-17918: - Summary: DESCRIBE output does not quote column names using reserved keywords Key: CASSANDRA-17918 URL: https://issues.apache.org/jira/browse/CASSANDRA-17918 Project: Cassandra Issue Type: Bug Reporter: Yifan Cai The DESCRIBE output of the column names that using reserved keywords are not quoted for UDTs. The following test reproduces. Reading the code, it looks like that the such columns names are not quoted in materialized view, UDF and user defined aggregation. The impact of the bug is that schema described cannot be imported due to the usage of reserved keywords as column names. {code:java} @Test public void testUsingReservedInCreateType() throws Throwable { String input = String.format("CREATE TYPE %s.test_type (\"token\" text, \"desc\" text);", KEYSPACE); schemaChange(input); UntypedResultSet rs = execute(String.format("DESC TYPE %s.test_type", KEYSPACE)); UntypedResultSet.Row row = rs.one(); String describedCreateStatement = row.getString("create_statement"); Assert.assertEquals("CREATE TYPE cql_test_keyspace.test_type (\n" + "token text,\n" + "desc text\n" + ");", describedCreateStatement); } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17918) DESCRIBE output does not quote column names using reserved keywords
[ https://issues.apache.org/jira/browse/CASSANDRA-17918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yifan Cai updated CASSANDRA-17918: -- Bug Category: Parent values: Correctness(12982)Level 1 values: API / Semantic Implementation(12988) Complexity: Low Hanging Fruit Component/s: Legacy/CQL Discovered By: Unit Test Severity: Normal Status: Open (was: Triage Needed) > DESCRIBE output does not quote column names using reserved keywords > --- > > Key: CASSANDRA-17918 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17918 > Project: Cassandra > Issue Type: Bug > Components: Legacy/CQL >Reporter: Yifan Cai >Priority: Normal > > The DESCRIBE output of the column names that using reserved keywords are not > quoted for UDTs. The following test reproduces. Reading the code, it looks > like that the such columns names are not quoted in materialized view, UDF and > user defined aggregation. > The impact of the bug is that schema described cannot be imported due to the > usage of reserved keywords as column names. > > {code:java} > @Test > public void testUsingReservedInCreateType() throws Throwable > { > String input = String.format("CREATE TYPE %s.test_type (\"token\" > text, \"desc\" text);", KEYSPACE); > schemaChange(input); > UntypedResultSet rs = execute(String.format("DESC TYPE %s.test_type", > KEYSPACE)); > UntypedResultSet.Row row = rs.one(); > String describedCreateStatement = row.getString("create_statement"); > Assert.assertEquals("CREATE TYPE cql_test_keyspace.test_type (\n" + > "token text,\n" + > "desc text\n" + > ");", > describedCreateStatement); > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17885) Add solution for CASSANDRA-17581 to older branches for tests
[ https://issues.apache.org/jira/browse/CASSANDRA-17885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608320#comment-17608320 ] Brandon Williams edited comment on CASSANDRA-17885 at 9/22/22 8:47 PM: --- I've pushed a fix to install the nodetool hack on any version below -3.0.27- 3.11.13, which now catches the 3.0.17 and 3.11.3 versions the upgrade tests are using. was (Author: brandon.williams): I've pushed a fix to install the nodetool hack on any version below 3.0.27, which now catches the 3.0.17 version the upgrade tests are using. > Add solution for CASSANDRA-17581 to older branches for tests > > > Key: CASSANDRA-17885 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17885 > Project: Cassandra > Issue Type: Bug > Components: Tool/nodetool >Reporter: Brandon Williams >Assignee: Brandon Williams >Priority: Normal > Fix For: 3.0.28, 3.11.14, 4.1-beta, 4.1 > > > Some of our tests use old branches for the purposes of testing upgrades and > behavior in mixed versions, but those lacking CASSANDRA-17581 will fail on > nodetool with a modern JDK. We can port this fix to those branches and > adjust the tests to use the newest version of them to solve this going > forward. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17885) Add solution for CASSANDRA-17581 to older branches for tests
[ https://issues.apache.org/jira/browse/CASSANDRA-17885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608423#comment-17608423 ] Ekaterina Dimitrova commented on CASSANDRA-17885: - [4.0|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1941/workflows/d3a59db8-f18c-41d4-910e-6a00ef9c0b6d], [4.1|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1942/workflows/06068ab4-c13f-4aa6-9ed5-7aec28b2d722], [trunk|https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/1943/workflows/c0fb79b4-d311-4400-9a1a-10d319b431c4] CI runs > Add solution for CASSANDRA-17581 to older branches for tests > > > Key: CASSANDRA-17885 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17885 > Project: Cassandra > Issue Type: Bug > Components: Tool/nodetool >Reporter: Brandon Williams >Assignee: Brandon Williams >Priority: Normal > Fix For: 3.0.28, 3.11.14, 4.1-beta, 4.1 > > > Some of our tests use old branches for the purposes of testing upgrades and > behavior in mixed versions, but those lacking CASSANDRA-17581 will fail on > nodetool with a modern JDK. We can port this fix to those branches and > adjust the tests to use the newest version of them to solve this going > forward. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17433) Revise use of pytz in Python >= 3.9
[ https://issues.apache.org/jira/browse/CASSANDRA-17433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brad Schoening updated CASSANDRA-17433: --- Description: PEP 615 – Support for the IANA Time Zone Database in the Standard Library class ZoneInfo PEP 615 (Python 3.9) has obsoleted the 3rd party library pytz with support for the Olsen tz library which previously was needed for the Olsen tz database. The code which imports this in cqlshmain.py and tests in [test_cqlsh_output.py|https://github.com/apache/cassandra/pull/1493/files/9c658a20c669d11a54ecc6b42ba083da13de0103#diff-f5a3955faadf50a1292df481044b83cefc44b2dac46676022c80bad076491a50] should be updated accordingly. This can be done with: if sys.version_info < (3,9): try: import pytz ... was: PEP 615 – Support for the IANA Time Zone Database in the Standard Library PEP 615 (Python 3.9) has obsoleted the 3rd party library pytz with support for the Olsen tz library which previously was needed for the Olsen tz database. The code which imports this in cqlsh.py and tests in [test_cqlsh_output.py|https://github.com/apache/cassandra/pull/1493/files/9c658a20c669d11a54ecc6b42ba083da13de0103#diff-f5a3955faadf50a1292df481044b83cefc44b2dac46676022c80bad076491a50] should be updated accordingly. This can be done with: if sys.version_info < (3,9): try: import pytz ... > Revise use of pytz in Python >= 3.9 > > > Key: CASSANDRA-17433 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17433 > Project: Cassandra > Issue Type: Task >Reporter: Brad Schoening >Priority: Normal > > PEP 615 – Support for the IANA Time Zone Database in the Standard Library > class ZoneInfo > PEP 615 (Python 3.9) has obsoleted the 3rd party library pytz with support > for the Olsen tz library which previously was needed for the Olsen tz > database. The code which imports this in cqlshmain.py and tests in > [test_cqlsh_output.py|https://github.com/apache/cassandra/pull/1493/files/9c658a20c669d11a54ecc6b42ba083da13de0103#diff-f5a3955faadf50a1292df481044b83cefc44b2dac46676022c80bad076491a50] > should be updated accordingly. > This can be done with: > if sys.version_info < (3,9): > try: > import pytz > ... -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608448#comment-17608448 ] Brad Schoening commented on CASSANDRA-17879: [~smiklosovic] see the linked PR and let me know how that works for you. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-15046) Add a "history" command to cqlsh. Perhaps "show history"?
[ https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yundi Chen updated CASSANDRA-15046: --- Test and Documentation Plan: Original Patch PR: [https://github.com/apache/cassandra/pull/1866/files] [NEW - NEEDS REVIEW] 09/22/22: documentation patch [https://github.com/apache/cassandra/commit/31f9a566bb70368dbffddeb672196355efe7ebb0] Unit tests to be implemented: 1. check "history" command outputs correct length of results 2. check "history" command outputs correct contents & order The current patch implements the feature in its minimally viable form. Here's some of my ideas for improvement to current patch: # allow an input argument to control how many commands will be listed. # showing the timestamp of when each command is executed. # showing whether each command is valid/successfully executed, OR, showing only the successfully executed commands. Thoughts? was: Patch PR: [https://github.com/apache/cassandra/pull/1866/files] Documentation: Will add documentation in doc/modules/cassandra/pages/tools/cqlsh.adoc and CHANGES.md describing the HISTORY command, following the documentation style of the other cqlsh commands. The current patch implements the feature in its minimally viable form. Here's some of my ideas for improvement to current patch: # allow an input argument to control how many commands will be listed. # showing the timestamp of when each command is executed. # showing whether each command is valid/successfully executed, OR, showing only the successfully executed commands. Thoughts? Status: Patch Available (was: In Progress) > Add a "history" command to cqlsh. Perhaps "show history"? > -- > > Key: CASSANDRA-15046 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15046 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: Wes Peters >Assignee: Yundi Chen >Priority: Low > Labels: ghc-lhf, lhf > Fix For: 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > I was trying to capture some create key space and create table commands from > a running cqlsh, and found there was no equivalent to the '\s' history > command in Postgres' psql shell. It's a great tool for figuring out what you > were doing yesterday. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-15046) Add a "history" command to cqlsh. Perhaps "show history"?
[ https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ekaterina Dimitrova updated CASSANDRA-15046: Reviewers: Ekaterina Dimitrova, Paulo Motta Status: Review In Progress (was: Patch Available) > Add a "history" command to cqlsh. Perhaps "show history"? > -- > > Key: CASSANDRA-15046 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15046 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: Wes Peters >Assignee: Yundi Chen >Priority: Low > Labels: ghc-lhf, lhf > Fix For: 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > I was trying to capture some create key space and create table commands from > a running cqlsh, and found there was no equivalent to the '\s' history > command in Postgres' psql shell. It's a great tool for figuring out what you > were doing yesterday. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-15046) Add a "history" command to cqlsh. Perhaps "show history"?
[ https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ekaterina Dimitrova updated CASSANDRA-15046: Status: Changes Suggested (was: Review In Progress) > Add a "history" command to cqlsh. Perhaps "show history"? > -- > > Key: CASSANDRA-15046 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15046 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: Wes Peters >Assignee: Yundi Chen >Priority: Low > Labels: ghc-lhf, lhf > Fix For: 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > I was trying to capture some create key space and create table commands from > a running cqlsh, and found there was no equivalent to the '\s' history > command in Postgres' psql shell. It's a great tool for figuring out what you > were doing yesterday. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-15046) Add a "history" command to cqlsh. Perhaps "show history"?
[ https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608463#comment-17608463 ] Ekaterina Dimitrova commented on CASSANDRA-15046: - Hi[~ychen02], I noticed you linked only the last commit. Though I found your trunk branch:) May I ask you to rebase your patch commits on top of trunk. Also, we normally create a new branch. You can name it anyway but very often we see people name them with ticket number-version we work on. Opening a PR will also make it easy to review. Thanks in advance > Add a "history" command to cqlsh. Perhaps "show history"? > -- > > Key: CASSANDRA-15046 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15046 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: Wes Peters >Assignee: Yundi Chen >Priority: Low > Labels: ghc-lhf, lhf > Fix For: 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > I was trying to capture some create key space and create table commands from > a running cqlsh, and found there was no equivalent to the '\s' history > command in Postgres' psql shell. It's a great tool for figuring out what you > were doing yesterday. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-15046) Add a "history" command to cqlsh. Perhaps "show history"?
[ https://issues.apache.org/jira/browse/CASSANDRA-15046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608463#comment-17608463 ] Ekaterina Dimitrova edited comment on CASSANDRA-15046 at 9/23/22 1:48 AM: -- Hi[~ychen02], I noticed you linked only the last commit. Though I found your trunk branch:) May I ask you to rebase your patch commits on top of trunk? Also, we normally create a new branch. You can name it anyway but very often we see people name them with ticket number-version we work on. Opening a PR will also make it easy to review. Thanks in advance was (Author: e.dimitrova): Hi[~ychen02], I noticed you linked only the last commit. Though I found your trunk branch:) May I ask you to rebase your patch commits on top of trunk. Also, we normally create a new branch. You can name it anyway but very often we see people name them with ticket number-version we work on. Opening a PR will also make it easy to review. Thanks in advance > Add a "history" command to cqlsh. Perhaps "show history"? > -- > > Key: CASSANDRA-15046 > URL: https://issues.apache.org/jira/browse/CASSANDRA-15046 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Interpreter >Reporter: Wes Peters >Assignee: Yundi Chen >Priority: Low > Labels: ghc-lhf, lhf > Fix For: 4.x > > Time Spent: 10m > Remaining Estimate: 0h > > I was trying to capture some create key space and create table commands from > a running cqlsh, and found there was no equivalent to the '\s' history > command in Postgres' psql shell. It's a great tool for figuring out what you > were doing yesterday. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17885) Add solution for CASSANDRA-17581 to older branches for tests
[ https://issues.apache.org/jira/browse/CASSANDRA-17885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608476#comment-17608476 ] Ekaterina Dimitrova commented on CASSANDRA-17885: - Almost there… 4 failing tests on each branch Some containers show build time out which I am not sure why… Probably we should check the logs tomorrow > Add solution for CASSANDRA-17581 to older branches for tests > > > Key: CASSANDRA-17885 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17885 > Project: Cassandra > Issue Type: Bug > Components: Tool/nodetool >Reporter: Brandon Williams >Assignee: Brandon Williams >Priority: Normal > Fix For: 3.0.28, 3.11.14, 4.1-beta, 4.1 > > > Some of our tests use old branches for the purposes of testing upgrades and > behavior in mixed versions, but those lacking CASSANDRA-17581 will fail on > nodetool with a modern JDK. We can port this fix to those branches and > adjust the tests to use the newest version of them to solve this going > forward. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org