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

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

  1. Insert channel, handle following msg types:insert channel
    1. DDL msg (CreateCollection/DropCollection/CreatePartition/DropPartition)
    2. InsertMsg
    3. DeleteMsg
  2. Search channel, handle following msg types:search channel
    1. SearchMsg
    2. RetrieveMsg

DataNode consumes messages from insert Insert channel only.

QueryNode consumes messages from both insert Insert channel and search Search channel.

To support delete, we will send DeleteMsg into insert Insert channel also.


Since Milvus's storage is an append-only, `delete` function is implemented using soft delete, setting a flag on entity to indicate this entity has been deleted.

...