[
https://issues.apache.org/jira/browse/GEODE-10048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17510983#comment-17510983
]
ASF subversion and git services commented on GEODE-10048:
---------------------------------------------------------
Commit 6b43b76e3d5a9c5b0c84df8e1995d61528871068 in geode's branch
refs/heads/develop from Jens Deppe
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=6b43b76 ]
GEODE-10048: Add framework for Redis events and BLPOP command (#7408)
* GEODE-10048: Add framework for Redis events and BLPOP command
This commit adds a simple eventing framework to be used by blocking
commands as well as keyspace event notification (still to be
implemented). The main components are:
- EventListener: an interface to be immplemented by anything wishing to
receive events. Currently only implemented for blocking commands in
the form of BlockingCommandListener.
- EventDistributor: the component to which listeners are registered and
where events are received and distributed. A single EventDistributor
exists in the system and is associated with each
ExecutionHandlerContext.
- Event: not implemented as a separate class but logically consists of
the command (RedisCommandType) and key (RedisKey).
When a blocking command receives a relevant event the command is
resubmitted into the Netty pipeline. This also means that something
could happen (another command) that causes the blocking command to
re-block and not complete. This is also what happens with native Redis.
For example:
- BLPOP 0 A executes and blocks
- LPUSH A some-value
- Before LPUSH fires an event, LPOP A is received but needs to wait to
acquire the lock on A
- LPUSH fires an event which the BLPOP listener receives and resubmits
BLPOP into the pipeline
- Once LPUSH completes, LPOP is next and removes A
- BLPOP A runs and ends up blocking again because there is nothing to
pop from A
> Create Common Infrastructure for Blocking Commands and Keyspace Event
> Notifications
> -----------------------------------------------------------------------------------
>
> Key: GEODE-10048
> URL: https://issues.apache.org/jira/browse/GEODE-10048
> Project: Geode
> Issue Type: New Feature
> Components: redis
> Reporter: Wayne
> Priority: Major
> Labels: pull-request-available
>
> Create the common infrastructure that will be used for implementing both
> Redis blocking commands and Keyspace Event Notifications.
>
> +Acceptance Criteria+
>
> The common infrastructure has been implemented along with appropriate unit
> testing.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)