tmp-objdir: fix regressions in core.fsyncobjectfiles=batch#1067
tmp-objdir: fix regressions in core.fsyncobjectfiles=batch#1067neerajsi-msft wants to merge 4 commits into
Conversation
The tmp_objdir API provides the ability to create temporary object directories, but was designed with the goal of having subprocesses access these object stores, followed by the main process migrating objects from it to the main object store or just deleting it. The subprocesses would view it as their primary datastore and write to it. Here we add the tmp_objdir_replace_primary_odb function that replaces the current process's writable "main" object directory with the specified one. The previous main object directory is restored in either tmp_objdir_migrate or tmp_objdir_destroy. For the --remerge-diff usecase, add a new `will_destroy` flag in `struct object_database` to mark ephemeral object databases that do not require fsync durability. Add 'git prune' support for removing temporary object databases, and make sure that they have a name starting with tmp_ and containing an operation-specific name. Based-on-patch-by: Elijah Newren <[email protected]> Signed-off-by: Neeraj Singh <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
When creating a subprocess with a temporary ODB, we set the GIT_QUARANTINE_ENVIRONMENT env var to tell child Git processes not to update refs, since the tmp-objdir may go away. Introduce a similar mechanism for in-process temporary ODBs when we call tmp_objdir_replace_primary_odb. Now both mechanisms set the disable_ref_updates flag on the odb, which is queried by the ref_transaction_prepare function. Note: This change adds an assumption that the state of the_repository is relevant for any ref transaction that might be initiated. Unwinding this assumption should be straightforward by saving the relevant repository to query in the transaction or the ref_store. Peff's test case was invoking ref updates via the cachetextconv setting. That particular code silently does nothing when a ref update is forbidden. See the call to notes_cache_put in fill_textconv where errors are ignored. Reported-by: Jeff King <[email protected]> Signed-off-by: Neeraj Singh <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
|
There is an issue in commit 0c86c99: |
2d3b3b6 to
9e78488
Compare
|
There is an issue in commit 0c86c99: |
Fix prune code to be able to delete multiple object directories. I wasn't properly resetting the strbuf with the path. Signed-off-by: Neeraj Singh <[email protected]>
When setup_work_tree executes, it redoes setup of the object database path and various other aspects of the_repository. This destroys the temporary object database state. This commit removes the temporary object database and reapplies it around the operations in the chdir_notify callback. Signed-off-by: Neeraj Singh <[email protected]>
9e78488 to
ef5a087
Compare
|
/submit |
|
Submitted as [email protected] To fetch this version into To fetch this version to local tag |
|
On the Git mailing list, Johannes Schindelin wrote (reply to this): |
|
On the Git mailing list, Junio C Hamano wrote (reply to this): |
|
On the Git mailing list, Neeraj Singh wrote (reply to this): |
|
User |
|
On the Git mailing list, Junio C Hamano wrote (reply to this): |
|
This branch is now known as |
|
This patch series was integrated into seen via git@6745aa6. |
|
This patch series was integrated into next via git@001a18c. |
|
This patch series was integrated into seen via git@af7cb07. |
That's good news, as the breakage is fixed in |
|
This patch series was integrated into seen via git@10b875b. |
|
This patch series was integrated into seen via git@a16745a. |
|
This patch series was integrated into seen via git@74afafe. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@e2b96b9. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@671cab4. |
|
This patch series was integrated into seen via git@62a9499. |
|
This patch series was integrated into seen via git@5a6656e. |
|
This patch series was integrated into seen via git@739ce11. |
|
This patch series was integrated into seen via git@5375511. |
|
This patch series was integrated into seen via git@69d5119. |
|
This patch series was integrated into seen via git@6cfd30d. |
|
This patch series was integrated into seen via git@69aafec. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@41e1342. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@1c958d7. |
|
This patch series was integrated into seen via git@a3ff8db. |
|
This patch series was integrated into seen via git@afed8ea. |
|
This patch series was integrated into seen via git@45b9a03. |
|
This patch series was integrated into seen via git@9c29f5e. |
|
This patch series was integrated into seen via git@a3c0865. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@1833f4c. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. On hold. cf. <[email protected]> |
|
This patch series was integrated into seen via git@f8d1005. |
|
This patch series was integrated into seen via git@1264f02. |
|
This patch series was integrated into seen via git@1ee62e4. |
|
There was a status update in the "Cooking" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. Expecting a reroll. cf. <CANQDOddCC7+gGUy1VBxxwvN7ieP+N8mQhbxK2xx6ySqZc6U7-g@mail.gmail.com> cf. <CABPp-BHq4DnkCZZ+HcnGiZYKHpWJgzMBjMDuWbbTFYPesm2sXA@mail.gmail.com> cf. <[email protected]> cf. <ef5a087813b7dfd232a9366eee09774d197e2307.1635287730.git.gitgitgadge= [email protected]> |
34f333b to
ecd81df
Compare
|
There was a status update in the "Graduated to 'master'" section about the branch New interface into the tmp-objdir API to help in-core use of the quarantine feature. source: <[email protected]> |
|
@neerajsi-msft I guess this can be closed now? (Sorry, GitGitGadget's automatic checks seem to have been defeated by this PR) |
Fix prune code to be able to work against multiple cruft directories. I noticed this in self-review.
When dscho enabled core.fsyncobjectfiles=batch in git-for-windows we saw some test-failures in
update-index tests. The root cause is that setup_work_tree does a chdir_notify, which erases the
tmp-objdir state. I now unapply and reapply the tmp-objdir around setup_git_env.
This branch autosquashes cleanly and it needs to be merged with ns/batched-fsync, where
it currently merges cleanly.
CC:[email protected]
cc: Neeraj Singh [email protected]