git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v4 2/3] merge-ort: ignore the directory rename split conflict for now

From
Elijah Newren <newren@gmail.com>
Date
Jan 24, 2021, 06:01 UTC
Message-ID
<20210124060112.1258291-3-newren@gmail.com>
In-Reply-To
<20210124060112.1258291-1-newren@gmail.com>

get_provisional_directory_renames() has code to detect directories being evenly split between different locations. However, as noted previously, if there are no new files added to that directory that was split evenly, our inability to determine where the directory was renamed to doesn't matter since there are no new files to try to move into the new location. Unfortunately, that code is unaware of whether there are new files under the directory in question and we just ignore that, causing us to fail t6423 test 2b but pass test 2a; turn off the error for now, swapping which tests pass and fail.

The motivating reason for switching this off as a temporary measure is that as we add optimizations, we'll start looking at only subsets of renames, and subsets of renames can start switching the result we get when this error is (wrongly) on. Once we get enough optimizations, however, we can prevent that code from even running when there are no new files added to the relevant directory, at which point we can revert this commit and then both testcases 2a and 2b will pass simultaneously.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 merge-ort.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/merge-ort.c b/merge-ort.c
index b5845ff6e9..f04fab96d7 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -1439,7 +1439,18 @@ static void get_provisional_directory_renames(struct merge_options *opt,
 				 "no destination getting a majority of the "
 				 "files."),
 			       source_dir);
-			*clean = 0;
+			/*
+			 * We should mark this as unclean IF something attempts
+			 * to use this rename.  We do not yet have the logic
+			 * in place to detect if this directory rename is being
+			 * used, and optimizations that reduce the number of
+			 * renames cause this to falsely trigger.  For now,
+			 * just disable it, causing t6423 testcase 2a to break.
+			 * We'll later fix the detection, and when we do we
+			 * will re-enable setting *clean to 0 (and thereby fix
+			 * t6423 testcase 2a).
+			 */
+			/*   *clean = 0;   */
 		} else {
 			strmap_put(&renames->dir_renames[side],
 				   source_dir, (void*)best);
-- 
2.30.0.135.g7f7d4a3e17
Previous: Elijah NewrenNext: Elijah Newren
Message 14 of 17 in “And so it begins...merge/rename performance work”
  1. 0/1 And so it begins...merge/rename performance workElijah Newren, Jan 8, 2021
  2. 1/1 merge-ort: begin performance work; instrument with trace2_region_* callsElijah Newren, Jan 8, 2021
  3. Taylor BlauJan 8, 2021
  4. Elijah NewrenJan 8, 2021
  5. Taylor BlauJan 8, 2021
  6. Elijah NewrenJan 9, 2021
  7. 0/1 And so it begins...merge/rename performance workElijah Newren, Jan 13, 2021
  8. 1/1 merge-ort: begin performance work; instrument with trace2_region_* callsElijah Newren, Jan 13, 2021
  9. Junio C HamanoJan 14, 2021
  10. Elijah NewrenJan 14, 2021
  11. 0/1 And so it begins...merge/rename performance workElijah Newren, Jan 15, 2021
  12. 1/1 merge-ort: begin performance work; instrument with trace2_region_* callsElijah Newren, Jan 15, 2021
  13. 0/3 And so it begins...merge/rename performance workElijah Newren, Jan 24, 2021
  14. 2/3 merge-ort: ignore the directory rename split conflict for nowElijah Newren, Jan 24, 2021
  15. 1/3 merge-ort: fix massive leakElijah Newren, Jan 24, 2021
  16. Derrick StoleeJan 24, 2021
  17. 3/3 merge-ort: begin performance work; instrument with trace2_region_* callsElijah Newren, Jan 24, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.