Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
def delete(self, condition=None)->MutationResult:
    """
    Delete entities by primary keys.
    Example: client.delete("_id in [1,10,100]")
    
    :param condition: an expression indicates whether an entity should be deleted
    :type  condition: str
    """

Design Details

Image RemovedImage Added

In Milvus, Proxy maintains 2 Pulsar channels for each collection:

...

Proposal delete operation persistent

Image Added

  1. DataNode subscribe the insert channel
  2. Proxy receives a delete request, split into insert channels by primary keys
  3. DataNode receives a delete request from the insert channel, save it in buffer, and write it into the delta channel
  4. ...
  5. DataNode receives a flush request, write out the deletions saved above
  6. DataNode notifies IndexNode to building indexes
  7. finish

Proposal delete operation serving search(sealed+growing)

Image Added

  1. QueryNode subscribe the insert channel
  2. QueryNode load the checkpoint and recovery by the checkpoint
  3. Proxy receives a delete request, split into insert channels by primary keys
  4. QueryNode retrieves a delete request from the insert channel, judges the segment to which each deletion belongs, and updates the Inverted Delta Logs(IDL)
  5. ...
  6. QueryNode retrieves a search request, search on each segment
  7. finish

...