Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
missing tombstones in dse 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan SVIHLA committed Oct 25, 2021
1 parent 263bab3 commit 73f8b16
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
sperf 0.6.16
------------
* tombstone warnings for 6.0.x are not parsed correctly

sperf 0.6.15
------------
* added detection for indexing backoff with auto soft commit
Expand Down
2 changes: 1 addition & 1 deletion pysper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""top level module for sperf python port"""
VERSION = "0.6.15"
VERSION = "0.6.16"
4 changes: 4 additions & 0 deletions pysper/changelog.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CHANGES = """
sperf 0.6.16
------------
* tombstone warnings for 6.0.x are not parsed correctly
sperf 0.6.15
------------
* added detection for indexing backoff with auto soft commit
Expand Down
6 changes: 3 additions & 3 deletions pysper/commands/core/diag.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""cassread command wiring"""
"""sperf core diag command wiring"""
from pysper.commands import flags
from pysper import VERSION
from pysper.core.diag import parse_diag, generate_report
Expand Down Expand Up @@ -72,7 +72,7 @@ def add_args(diag_parser):


def add_flags(subparsers, name, run_func, is_deprecated=False):
"""so we can share the parser with the legacy sperf cassread command"""
"""so we can share the parser with the legacy 'sperf core diag' command"""
help_text = "Generates a diagtarball report. DSE 5.0-6.8"
if is_deprecated:
help_text = help_text + ". DEPRECATED: use 'sperf core diag' instead"
Expand All @@ -84,7 +84,7 @@ def add_flags(subparsers, name, run_func, is_deprecated=False):


def build(subparsers):
"""builds the cassread command up, assumes argparser api"""
"""builds the sperf core diag command up, assumes argparser api"""
add_flags(subparsers, "diag", run)


Expand Down
2 changes: 1 addition & 1 deletion pysper/commands/sperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def run():
print(str(ex))
print("")
print(
"To show strack trace use the -v flag. For example: 'sperf -v cassread'"
"To show strack trace use the -v flag. For example: 'sperf -v core statuslogger'"
)
else:
print("sperf version %s" % VERSION)
Expand Down
4 changes: 3 additions & 1 deletion pysper/commands/sperf_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ def run(args):
raise ex
print(str(ex))
print("")
print("To show strack trace use the -v flag. For example: 'sperf -v cassread'")
print(
"To show strack trace use the -v flag. For example: 'sperf -v core statuslogger'"
)
2 changes: 1 addition & 1 deletion pysper/core/diag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""information collection and report writing for the cassread tool"""
"""information collection and report writing for the sperf core diag command"""
from pysper.core.diag import reporter, node_env, table_stats, config_diff, read_ahead
from pysper import diag, util

Expand Down
2 changes: 1 addition & 1 deletion pysper/core/diag/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""formats the output of the cassread parsed data"""
"""formats the output of the sperf core diag parsed data"""
from pysper import humanize, env

# used for report formatting
Expand Down
12 changes: 12 additions & 0 deletions pysper/parser/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,18 @@ def zc_rules():
def tombstone_rules():
"""catch tombstone problems"""
return (
case("ReadCommand"),
rule(
capture(
r"Read (?P<live_rows>[0-9]*) live rows and (?P<tombstones>[0-9]*) tombstone cells for query (?P<query>.*) \(see tombstone_warn_threshold\)"
),
convert(int, "tombstones"),
update(
event_product="tombstone",
event_category="reading",
event_type="tpc_scan_warn",
),
),
case("MessageDeliveryTask"),
rule(
capture(
Expand Down
5 changes: 3 additions & 2 deletions scripts/sperf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import sys
import os
import platform
if platform.python_version() < '3.7':

if platform.python_version() < "3.7":
raise Exception("sperf requires at least Python 3.7, consider a packaged release")
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from pysper.commands import sperf

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="sperf",
version="0.6.15",
version="0.6.16",
description="Diagnostic utility for DSE and Cassandra",
url="https://www.github.com/DataStax-Toolkit/sperf",
scripts=["scripts/sperf"],
Expand Down
2 changes: 1 addition & 1 deletion tests/commands/test_sperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_sperf_will_break_if_incorrect_comamnd_is_used(self):
self.assertTrue(success)

def test_core_diag_wired(self):
"""verify cassread is connected"""
"""verify sperf core diag is connected"""
parser = sperf.build_parser()
args = parser.parse_args(["core", "diag"])
self.assertTrue(hasattr(args, "func"))
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_statuslogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_skip_duplicate_events_diag(self):
self.assertTrue(sl.analyzed)
self.assertEqual(len(sl.nodes), 3)
s = Summary(sl.nodes)
self.assertEqual(s.lines, 22054)
self.assertEqual(s.lines, 22055)
self.assertEqual(s.skipped_lines, 445)
self.assertEqual(
s.get_busiest_stages()[0],
Expand Down
3 changes: 2 additions & 1 deletion tests/test_sperf_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def run():
---------------
* There were 16 incidents of GC over 500ms. Run `sperf core gc` for more analysis.
* There were drops of the following request types: MUTATION for a total of 1096 drops. Run sperf core statuslogger and look for high pending stages for those messages types.
* Global local backpressure was active on the following nodes: 10.101.35.102 (1 times). GC was over target %s times however despire TPC backpressure being active it may be dangerous to raise TPC limits, run sperf core statuslogger for further analysis on the type of requests that are pending.""",
* Global local backpressure was active on the following nodes: 10.101.35.102 (1 times). GC was over target %s times however despire TPC backpressure being active it may be dangerous to raise TPC limits, run sperf core statuslogger for further analysis on the type of requests that are pending.
* Tombstone warnings found, there were 1951 total tombstones scanned. The data model has a problem.""",
)

def test_sperf_68(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_statuslogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def run():
output,
"sperf core statuslogger version: %s\n" % (VERSION)
+ """
Summary (22,054 lines)
Summary (22,055 lines)
Summary (445 skipped lines)
dse versions: {'6.7.7'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2462,3 +2462,4 @@ INFO [GCInspector:1] 2020-01-10 17:19:08,323 GCInspector.java:313 - G1 Young G
INFO [commitScheduler-6-thread-1] 2020-01-10 17:19:14,043 DocumentsWriter.java:785 - Waited 16 milliseconds for 7 flushing segments.
INFO [commitScheduler-6-thread-1] 2020-01-10 17:19:24,124 DocumentsWriter.java:785 - Waited 0 milliseconds for 0 flushing segments.
INFO [NodeSyncMaintenanceTasks:1] 2020-01-10 17:19:43,531 NodeSyncMaintenanceTasks.java:172 - In last 10m: validated 0B (0B/s), 0% was inconsistent.
WARN [CoreThread-3] 2020-01-10 17:19:47,591 ReadCommand.java:535 - Read 1 live rows and 1951 tombstone cells for query SELECT * FROM keyspace1.standard1 WHERE id = 894e165d-beba-433d-ab52-055c570fcb9b LIMIT 2000 (see tombstone_warn_threshold)

0 comments on commit 73f8b16

Please sign in to comment.