Today I discovered a problem which required the reprocessing of about 400 commits.
How is that accomplished?
- delete the commits from the database
- tell the ingress daemon to start processing from commit x
This works so long as all the commits have been process in order. The canonical method would query git to get a list of commits from A to B and then delete only those commits.
If you’ve been messing about with other commits and rerunning them, the method you see below may delete more than you anticipate.
The last successful commit was d9058fd29e8c3521cdece20a56a0ffdde4c1647f. This SQL deletes all commits which came in after that commit. This takes advantage of increasing values in the id field.
freshports.testgit=# begin; delete from commit_log where id > (select id from commit_log where svn_revision = 'd9058fd29e8c3521cdece20a56a0ffdde4c1647f'); BEGIN DELETE 394 freshports.testgit=# freshports.testgit=# freshports.testgit=# commit; COMMIT freshports.testgit=#
This step involves resetting the starting point for commit processing.
[dan@testgit-ingress01:/var/db/ingress/repos] $ cat latest.ports 3aa7a82534ec67d837a2e305480b45007f3d9b15 [dan@testgit-ingress01:/var/db/ingress/repos] $ echo 'echo d9058fd29e8c3521cdece20a56a0ffdde4c1647f > latest.ports' | sudo su -fm ingress [dan@testgit-ingress01:/var/db/ingress/repos] cat latest.ports d9058fd29e8c3521cdece20a56a0ffdde4c1647f [dan@testgit-ingress01:/var/db/ingress/repos] $
What the delete fails to recognize is it will delete all commits, src, doc, and ports.
Therefore, you have to rerun commits for src and doc, not just ports.
[dan@testgit-ingress01:/var/db/ingress/repos] echo 'echo 1f76329528e0a19a002ca0c174819bc4290fe04d > latest.doc' | sudo su -fm ingress [dan@testgit-ingress01:/var/db/ingress/repos] echo 'echo 5e912f5fec025766521f535d1237330ede7f18e2 > latest.src' | sudo su -fm ingress