Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

do not apply deletion of addresses to DB, only to output #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

remi-dupre
Copy link
Contributor

Current behavior is the following:

  1. compute the list of address IDs to delete
  2. write this list of IDs to a SQLite table
  3. perform a request to remove addresses that have an ID in this table

These last two steps seem to take about half a day in our integration environment while they perform some overly complicated tasks.

This PR removes these last two steps and just reuses the HashSet computed at step 1 to filter addresses (with no I/O) while we output them for the final dump.

@remi-dupre remi-dupre requested a review from sdrll March 8, 2022 07:59
@remi-dupre remi-dupre self-assigned this Mar 8, 2022
This was a debugging feature that was not even used in the main binary
and which was not even valid since addresses to delete are computed on
the fly.
/// A database, this structure can be used to open connections or perform high-level operations.
pub struct DbHashes {
db_path: PathBuf,
to_delete: HashSet<i64>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it could be difficult to understand that the hashset is outside the sqlite DB, because sometimes it could be weird to manipulate the Hashset from the DbHashes instance. I don't have a lot of idea apart from renaming the struct such as HashesStorages

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants