torwig opened a new pull request, #1251:
URL: https://github.com/apache/incubator-kvrocks/pull/1251

   Syntax: `XLEN stream_name [entry_id] [direction]`. 
   Where direction can be '-' or '+' (special IDs mean respectively the first 
and the last elements in the stream). Default value: '+'. 
   
   If an optional entry ID is specified, the XLEN command returns the number of 
entries between that ID and the first/last element of the stream. 
   
   The element with the specified ID is not considered - it serves as an 
exclusive boundary. If the stream doesn't contain an entry with the specified 
ID, the command starts counting from the closest entry to the first/last 
element in the stream. 
   
   If the specified ID is equal to or greater than the last entry ID and: 
   a) direction is '+' - the command returns 0
   b) direction is '-' - the command returns the stream's size 
   
   If the specified ID is equal to or less than the first entry ID and: 
   a) direction is '-' the command returns 0
   b) direction is '+' the command returns stream's size 
   
   This feature is helpful in finding:
   a) how many entries in the stream were processed so far 
   b) how many unprocessed entries  (ahead of the current one) are in the stream
   
   Complexity: O(n)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to