Speed up reverts
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Domaine
- backend, database, performance
Piste de recherche
Commencez par profiler les requêtes actuelles d’annulation de blocs de graph-node et par les comparer à des requêtes limitées aux IDs de version des entités affectées (vid). Utilisez ces mesures pour déterminer la structure des données en mémoire par bloc et la limite de rétention ; le travail est considéré comme terminé lorsqu’une amélioration mesurée de la vitesse d’annulation est obtenue et que le comportement existant reste disponible lorsqu’il n’y a pas de données.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
For some subgraphs, reverting blocks is still slow. The best way to speed this up might be to restrict the queries we run to revert the block by the vid of the entity versions that are actually affected by the revert. To facilitate that, graph-node should keep a list of the vid's of entities by block in memory as it moves forward and processes blocks. That list can then be used to speed up reverts.
Even if we only keep this data for a small number of blocks (say 5), it should help in speeding up reverts already. It's ok if we do not have that data for a revert (e.g., after a cold start), we can just fall back to the current behavior. The amount of data to keep should be relatively small, as mappings typically only alter a small number of entities for each block, but we might want to limit this by only keeping the data if there are fewer than N vid's to keep for a block.
Before implementing this, we should analyze the performance of the current queries and compare it to the performance of queries including the vid of the entities affected by the rollback. That should also inform the shape of the data we keep in memory, but will likely look like this for the different operations in a specific block:
create: remember thevidof the new entityupdate: remember thevidof the old and the new version of the entitydelete: remember thevidof the deleted entity version
During a revert, we'd then use this information to narrow down which rows in a table to change, for example the query to delete entity versions that are now in the future would become
delete from things where vid in ($vids)
where vids contains what we recorded as new versions for a create or update
- Langage dominant
- Rust
- Étoiles
- 3.2k
- Forks
- 1.1k
- Merge moyen
- 4 j 1 h
- PR mergées (30 j)
- 1
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de graphprotocol/graph-node
-
current: include emits an all-null bucket for dimensionless aggregations, nulling the whole response Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
graphprotocol/graph-node#6719 ·
-
RUSTSEC-2026-0194: Quadratic run time when checking a start tag for duplicate attribute names Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
graphprotocol/graph-node#6673 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
graphprotocol/graph-node#6650 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
graphprotocol/graph-node#6722 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
graphprotocol/graph-node#6721 ·
Toutes les issues de graphprotocol/graph-node
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100