Skip to content

Commit

Permalink
remove logging code to detect log duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Dec 29, 2023
1 parent 739c069 commit f9553ed
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/graphsenselib/db/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,35 +509,6 @@ def ingest(
if auto_none_to_unset:
items = [none_to_unset(row) for row in items]

if table == "log":
x = [
item
for item in items
if len(item["topics"]) % 2 == 0
and len(item["topics"]) > 0
and item["topics"][: len(item["topics"]) // 2]
== item["topics"][len(item["topics"]) // 2 :]
]
if len(x) > 0:
logger.warning(x)
# from collections import defaultdict

# dic = defaultdict(int)
# for i in items:
# dic[
# (
# i["block_id_group"],
# i["block_id"],
# i["topic0"].hex(),
# i["log_index"],
# )
# ] += 1

# assert len([v for v in dic.values() if v > 1]) == 0
blks = [it["block_id"] for it in items if "block_id" in it]
if len(blks) > 0:
logger.debug(f"{table}," f" {min(blks)}, {max(blks)}, {len(items)}")

self._exe_with_retries(stmt, items, concurrency=concurrency)

@needs_session
Expand Down

0 comments on commit f9553ed

Please sign in to comment.