ooni / ooni/backend

Duplicate data present in some s3 buckets

Open
#613 0 comments 0 reactions 1 assignee View on GitHub

@FedericoCeratto is already working on this.

Since Sep 20, 2022.

bug pipeline
Dominant language
Python
Stars
61
Forks
33
Avg merge
3d 2h
Merged PRs (30d)
3

Description

I have noticed that certain old buckets contain duplicate measurement data, which can be confusing for somebody analysing the data from the JSONL outputs. If they are not careful they might end up double counting measurements.

A case in point is whatsapp data for Italy from the 20180101 bucket, where we have the following report_ids present:

['20171231T091557Z_AS12874_pnMQzVEE8ILhRBSSmiRJIxGHhpdwRLMwvPtU7y8WwOcoDcmiqG', '20171231T105131Z_AS12874_98QAaH11uDox6sJH1YuYF1n3aXNXF5VTk4YX49UQDaTWUYTnjr', '20171231T105316Z_AS12874_miArFfG7Br19RmVZWYBDZKzTtzraYIpOQPYzvMF4RTeyolKTwb', '20171231T134433Z_AS3269_06X59S6ReknS3PbSEuUMqWhbJPcTGwQr4x0ltwMnZVSmfTUR79', '20171231T091557Z_AS12874_pnMQzVEE8ILhRBSSmiRJIxGHhpdwRLMwvPtU7y8WwOcoDcmiqG', '20171231T105131Z_AS12874_98QAaH11uDox6sJH1YuYF1n3aXNXF5VTk4YX49UQDaTWUYTnjr', '20171231T105316Z_AS12874_miArFfG7Br19RmVZWYBDZKzTtzraYIpOQPYzvMF4RTeyolKTwb', '20171231T134433Z_AS3269_06X59S6ReknS3PbSEuUMqWhbJPcTGwQr4x0ltwMnZVSmfTUR79']

Upon inspecting the content of the bucket I can see two files with a different filename format and a different timestamp:

% aws s3 ls --no-sign-request s3://ooni-data-eu-fra/jsonl/whatsapp/IT/20200101/00/
2021-07-09 12:34:20      39562 20200101_IT_whatsapp.l.0.jsonl.gz
2022-05-19 21:57:02      39526 20200101_IT_whatsapp.x.411d9d2e15f1bd08.jsonl.gz

I believe this is due to the reprocessing that was done at some point, but the old files where left around.

We should clean these duplicates up or at least document how somebody can easily distinguish between the two and avoid double counting.

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.