Check that BigQuery `interned_strings` survives staging retention on devnet and mainnet

Open Beginner friendly
#8,342 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
google-cloud, postgresql, sql
Domain
databases

Research direction

Wait until at least 8 days after the one-time interned_strings backfill finishes on each network. Run the supplied BigQuery count query for each listed project and dataset, then compare its n, ids and max_id with the Postgres count through max_id. The check is complete when all three counts are equal on both devnet and mainnet.

Written by the indexing model from the issue text.

Description

Part of #7553. Confirms #8219's append keeps every interned_strings row in production after staging purges it.

When: 8 or more days after the one-time interned_strings backfill finishes on a network. Staging retention is 7 days there.

network project prod dataset
devnet da-cn-devnet devnet_da2_scan_prod
mainnet da-cn-mainnet mainnet_da2_scan_prod

For each network:

  1. Production, with <project> and <dataset> from the table:
    bq query --project_id=<project> --use_legacy_sql=false \
      'SELECT count(*) AS n, count(DISTINCT id) AS ids, max(id) AS max_id
       FROM `<project>.<dataset>.scan_sv_1_interned_strings`'
    
  2. Scan's Postgres, using max_id from step 1. Rows newer than the last hourly append aren't in production yet, so this ignores them:
    cncluster psql sv-1 scan-app
    
    SELECT count(*) FROM scan_sv_1.interned_strings WHERE id <= <max_id>;
    

Pass: n, ids and the Postgres count are all equal.

Dominant language
Scala
Stars
118
Forks
125
Avg merge
1d 9h
Merged PRs (30d)
379

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from canton-network/splice

All issues in canton-network/splice

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.