Solr
  1. Solr
  2. SOLR-2492

DIH does not commit if only Deletes are processed

    Details

      Description

      If a DIH run processes deletes using the $deleteDocById and/or $deleteDocByQuery special commands, and if no adds or updates get processed in the same run, then "commit" is never called. Also, the # of deleted documents does not get incremented.

      1. SOLR-2492-branch3x.patch
        2 kB
        Shalin Shekhar Mangar
      2. SOLR-2492.patch
        2 kB
        Shalin Shekhar Mangar
      3. SOLR-2492.patch
        2 kB
        James Dyer

        Issue Links

          Activity

          James Dyer created issue -
          Hide
          James Dyer added a comment -

          This patch increments the # deleted documents once for each call to $deleteDocById and/or $deleteDocByQuery. Note that it would be even better (especially with ..byQuery) to get the actual # of deleted documents and increment by that many.

          By incrementing the # deleted documents, "commit" is called at the end of the run as expected. This fixes the issue of commit not being called and also causes the # of deleted documents to be reported back to the user. While this is better than current behavior, the actual # of reported deletions may not be accurate because a call to $deleteDocById may not actually delete a document. Likewise a call to $deleteDocByQuery could delete more than 1 document (or none).

          A unit test is provided.

          Show
          James Dyer added a comment - This patch increments the # deleted documents once for each call to $deleteDocById and/or $deleteDocByQuery. Note that it would be even better (especially with ..byQuery) to get the actual # of deleted documents and increment by that many. By incrementing the # deleted documents, "commit" is called at the end of the run as expected. This fixes the issue of commit not being called and also causes the # of deleted documents to be reported back to the user. While this is better than current behavior, the actual # of reported deletions may not be accurate because a call to $deleteDocById may not actually delete a document. Likewise a call to $deleteDocByQuery could delete more than 1 document (or none). A unit test is provided.
          James Dyer made changes -
          Field Original Value New Value
          Attachment SOLR-2492.patch [ 12478094 ]
          James Dyer made changes -
          Link This issue duplicates SOLR-2104 [ SOLR-2104 ]
          Hide
          Robert Muir added a comment -

          Bulk move 3.2 -> 3.3

          Show
          Robert Muir added a comment - Bulk move 3.2 -> 3.3
          Robert Muir made changes -
          Fix Version/s 3.3 [ 12316471 ]
          Fix Version/s 4.0 [ 12314992 ]
          Fix Version/s 3.2 [ 12316172 ]
          Robert Muir made changes -
          Fix Version/s 3.4 [ 12316683 ]
          Fix Version/s 4.0 [ 12314992 ]
          Fix Version/s 3.3 [ 12316471 ]
          Shalin Shekhar Mangar made changes -
          Assignee Shalin Shekhar Mangar [ shalinmangar ]
          Hide
          Shalin Shekhar Mangar added a comment -

          Patch updated to trunk.

          Show
          Shalin Shekhar Mangar added a comment - Patch updated to trunk.
          Shalin Shekhar Mangar made changes -
          Attachment SOLR-2492.patch [ 12486283 ]
          Hide
          Shalin Shekhar Mangar added a comment -

          Patch for branch_3x

          Show
          Shalin Shekhar Mangar added a comment - Patch for branch_3x
          Shalin Shekhar Mangar made changes -
          Attachment SOLR-2492-branch3x.patch [ 12486284 ]
          Hide
          Shalin Shekhar Mangar added a comment -

          Committed revision 1145925 on trunk and 1145928 on branch_3x.

          Thanks James!

          Show
          Shalin Shekhar Mangar added a comment - Committed revision 1145925 on trunk and 1145928 on branch_3x. Thanks James!
          Shalin Shekhar Mangar made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          James Dyer added a comment -

          Thank you, Shalin! I also updated the wiki with a note about commits / increments and the pre-3.4 vs post-3.4 behavior.

          Show
          James Dyer added a comment - Thank you, Shalin! I also updated the wiki with a note about commits / increments and the pre-3.4 vs post-3.4 behavior.
          Hide
          Robert Muir added a comment -

          bulk close for 3.4

          Show
          Robert Muir added a comment - bulk close for 3.4
          Robert Muir made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          70d 12h 28m 1 Shalin Shekhar Mangar 13/Jul/11 10:28
          Resolved Resolved Closed Closed
          65d 5h 20m 1 Robert Muir 16/Sep/11 15:48

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              James Dyer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development