summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/xdel.md
diff options
context:
space:
mode:
Diffstat (limited to 'iredis/data/commands/xdel.md')
-rw-r--r--iredis/data/commands/xdel.md36
1 files changed, 18 insertions, 18 deletions
diff --git a/iredis/data/commands/xdel.md b/iredis/data/commands/xdel.md
index 3f507a8..3ee4a3d 100644
--- a/iredis/data/commands/xdel.md
+++ b/iredis/data/commands/xdel.md
@@ -1,30 +1,30 @@
Removes the specified entries from a stream, and returns the number of entries
-deleted, that may be different from the number of IDs passed to the command in
-case certain IDs do not exist.
+deleted. This number may be less than the number of IDs passed to the command in
+the case where some of the specified IDs do not exist in the stream.
Normally you may think at a Redis stream as an append-only data structure,
-however Redis streams are represented in memory, so we are able to also delete
-entries. This may be useful, for instance, in order to comply with certain
-privacy policies.
+however Redis streams are represented in memory, so we are also able to
+delete entries. This may be useful, for instance, in order to comply with
+certain privacy policies.
-# Understanding the low level details of entries deletion
+## Understanding the low level details of entries deletion
-Redis streams are represented in a way that makes them memory efficient: a radix
-tree is used in order to index macro-nodes that pack linearly tens of stream
-entries. Normally what happens when you delete an entry from a stream is that
-the entry is not _really_ evicted, it just gets marked as deleted.
+Redis streams are represented in a way that makes them memory efficient:
+a radix tree is used in order to index macro-nodes that pack linearly tens
+of stream entries. Normally what happens when you delete an entry from a stream
+is that the entry is not *really* evicted, it just gets marked as deleted.
Eventually if all the entries in a macro-node are marked as deleted, the whole
-node is destroyed and the memory reclaimed. This means that if you delete a
-large amount of entries from a stream, for instance more than 50% of the entries
-appended to the stream, the memory usage per entry may increment, since what
-happens is that the stream will start to be fragmented. However the stream
-performances will remain the same.
+node is destroyed and the memory reclaimed. This means that if you delete
+a large amount of entries from a stream, for instance more than 50% of the
+entries appended to the stream, the memory usage per entry may increment, since
+what happens is that the stream will become fragmented. However the stream
+performance will remain the same.
In future versions of Redis it is possible that we'll trigger a node garbage
-collection in case a given macro-node reaches a given amount of deleted entries.
-Currently with the usage we anticipate for this data structure, it is not a good
-idea to add such complexity.
+collection in case a given macro-node reaches a given amount of deleted
+entries. Currently with the usage we anticipate for this data structure, it is
+not a good idea to add such complexity.
@return