[Feature][Core] Backfill: when timeAfter moves earlier, collect only the missing period instead of restarting full sync
Les mainteneurs répondent en général sous 3 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- go
- Domaine
- data-engineering
Piste de recherche
Start with backend/helpers/pluginhelper/api/collector_state_manager.go and the duplicated SubtaskStateManager logic; trace how GetSince() and GetUntil() reach collectors. Then inspect api_collector.go, graphql_collector.go, and GitHub collectors, including workflow runs, to find flush behavior and range filters. Done means backfill fetches only the missing interval, preserves existing raw rows, and stores the earlier TimeAfter; collectors that cannot bound the range may retain full recollection.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Search before asking
- I had searched in the issues and found no similar feature requests.
Use case
A project is first collected with timeAfter = T1. Later the user moves timeAfter to an earlier date T0 < T1 to get more history. Today this restarts the collection from scratch:
NewCollectorStateManager(backend/helpers/pluginhelper/api/collector_state_manager.go) seessyncPolicy.TimeAfter.Before(state.TimeAfter)and drops to full-sync mode:since = T0,isIncremental = false.- Every collector then fetches
[T0, now], which includes[T1, now], the period that was already collected. - The REST and GraphQL collectors (
api_collector.go,graphql_collector.go: "flush data if not incremental collection") delete all existing raw rows for the scope before fetching.
For large scopes the repeated fetch is the expensive part. GitHub workflow runs and jobs dominate API calls and run time, and the rate limit is shared by every pipeline using the same App or token. A full re-collection also leaves the scope with fewer rows until it finishes.
Description
Add a third collection mode, "backfill", used when the new timeAfter is earlier than the stored one:
- Collect only
[T0, T1]:since = T0, with an upper bounduntil = state.TimeAfter. - Do not flush the existing raw data.
- On success, store
T0as the newTimeAfter(the existing code already updates it for full syncs). - Apply the same rule in
SubtaskStateManager, which duplicates the logic.
Collectors need to honour the upper bound. Today only a few call GetUntil() (in the GitHub plugin, only the workflow runs collector); the rest use GetSince() alone. A backfill would add an until filter to each collector's request or stop condition, and fetch child records (reviews, comments, jobs) only for the newly found parents.
Collectors that cannot bound the range could keep today's behaviour (a full re-collect), so this can ship incrementally, starting with the state managers and one or two collectors.
Related issues
None found.
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Langage dominant
- Go
- Étoiles
- 3.2k
- Forks
- 830
- Merge moyen
- 2 j 22 h
- PR mergées (30 j)
- 49
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun 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 apache/devlake
-
[Bug][Blueprint] Cron-triggered pipelines use a sanitized plan after PATCH /blueprints, gitextractor fails with masked credentialsPeut-être pris @Thanatos9404 l’a pris il y a 2 jours. Ouverte
Difficulté 4/5 1-2 jours Accessibilité débutants 56/100
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 3/5 1-2 jours Accessibilité débutants 42/100
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 55/100
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de apache/devlake
Issues similaires
-
[BUG] deploy.restart_policy without condition drops the restart policyPeut-être pris @akshat-lakhera l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
docker/compose#14383 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
AvengeMedia/dank-greeter#39 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
dokku/dokku-datastore#367 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: ap gateway image build cannot find local policies on WindowsPeut-être pris @Jayzilva l’a pris aujourd’hui. OuverteAspect/Configuration Severity/Major
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
wso2/api-platform#3912 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours