Git Merge Request #436: Improvements to ensure_index de-duping (merged)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Dave Brondsema wants to merge 3 commits from /u/brondsem/allura/ to master, 2025-03-06

  • don't de-dupe automatically, add --delete-duplicate-key-records arg
  • support sparse indexes better
  • support nested index fields like "foo.bar.baz"

I did not add any tests, sadly. Existing tests use Mock objects, which is hard to work with and not testing actual ming or mongo behavior then. Switching to mim:// would be a bit better but still not reflect real mongo. I tested this with real mongo manually.

Commit Date  
[d44d5e] (db/better_safe_index_deduping) by Dave Brondsema Dave Brondsema

ensure_index: make deduping work on nested fields like "foo.bar.baz"

2025-03-06 16:58:41 Tree
[63430d] by Dave Brondsema Dave Brondsema

ensure_index: deduping on a sparse index only needs to look at records where the field exists

2025-03-06 16:58:11 Tree
[097e05] by Dave Brondsema Dave Brondsema

ensure_index: require explicit --delete-duplicate-key-records to delete records

2025-03-06 16:57:23 Tree

Discussion

  • Dave Brondsema

    Dave Brondsema - 2025-03-06
    • Description:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
     * don't de-dupe automatically, add `--delete-duplicate-key-records` arg
     * support sparse indexes better
     * support nested index fields like "foo.bar.baz"
    +
    +I did not add any tests, sadly.  Existing tests use Mock objects, which is hard to work with and not testing actual ming or mongo behavior then.  Switching to mim:// would be a bit better but still not reflect real mongo.  I tested this with real mongo manually.
    
     
  • Kenton Taylor - 2025-03-06
    • Status: open --> merged
     

Log in to post a comment.