forked from importers/git-importer
Fix even more issues with the linked_revs considered cache
This commit is contained in:
parent
996b90dd7a
commit
65000cd586
@ -207,9 +207,14 @@ class DB:
|
||||
"UPDATE scheme SET version=18",
|
||||
)
|
||||
schemes[19] = (
|
||||
"CREATE INDEX ON files(revision_id);",
|
||||
"CREATE INDEX ON files(revision_id)",
|
||||
"UPDATE scheme SET version=19",
|
||||
)
|
||||
schemes[20] = (
|
||||
"CREATE INDEX ON linked_revs(linked_id)",
|
||||
"CREATE INDEX ON linked_revs(considered)",
|
||||
"UPDATE scheme SET version=20",
|
||||
)
|
||||
schema_version = self.schema_version()
|
||||
if (schema_version + 1) not in schemes:
|
||||
return
|
||||
|
@ -191,7 +191,7 @@ class Importer:
|
||||
if not prev:
|
||||
with db.cursor() as cur:
|
||||
cur.execute(
|
||||
"UPDATE linked_revs SET considered=TRUE where revision_id=%s",
|
||||
"UPDATE linked_revs SET considered=TRUE where linked_id=%s",
|
||||
(rev.dbid,),
|
||||
)
|
||||
return
|
||||
@ -210,7 +210,7 @@ class Importer:
|
||||
continue
|
||||
last_linked = linked
|
||||
cur.execute(
|
||||
"UPDATE linked_revs SET considered=TRUE where revision_id=%s",
|
||||
"UPDATE linked_revs SET considered=TRUE where linked_id=%s",
|
||||
(rev.dbid,),
|
||||
)
|
||||
if not last_linked:
|
||||
@ -224,7 +224,7 @@ class Importer:
|
||||
)
|
||||
if cur.fetchone():
|
||||
cur.execute(
|
||||
"UPDATE linked_revs SET considered=TRUE where revision_id=%s",
|
||||
"UPDATE linked_revs SET considered=TRUE where linked_id=%s",
|
||||
(rev.dbid,),
|
||||
)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user