发明名称 Handling memory pressure in an in-database sharded queue
摘要 Handling memory pressure in an in-database sharded queue is described. Messages from a plurality of enqueuers are stored in a plurality of shards of a sharded queue. Messages from a first enqueuer are stored in a first shard. A queue table corresponding to the sharded queue is maintained. In volatile memory, a plurality of message caches is maintained, each message cache corresponding to a shard of the plurality of shards. Memory pressure is detected based on memory usage of the volatile memory. To store a specific message from the enqueuer, the specific message is stored in rows of the queue table that are assigned to the first shard. When memory pressure is not detected, the specific message is stored in a first message cache corresponding to the first shard. Subscribers of the sharded queue are caused to dequeue messages from the plurality of shards.
申请公布号 US9495296(B2) 申请公布日期 2016.11.15
申请号 US201414165974 申请日期 2014.01.28
申请人 Oracle International Corporation 发明人 Subramanyam Sunitha;Bose Shubha;Madan Anil;Singh Devendra;Stamos James W.;Jaiswal Mukesh
分类号 G06F17/30;G06F12/08 主分类号 G06F17/30
代理机构 Hickman Palermo Becker Bingham LLP 代理人 Hickman Palermo Becker Bingham LLP
主权项 1. A method comprising: enqueueing messages from a plurality of enqueuers in a plurality of shards of a sharded queue; wherein the plurality of enqueuers comprises a first enqueuer, wherein all messages from the first enqueuer are enqueued in a first shard; maintaining, in a relational database system, a queue table corresponding to the sharded queue; maintaining, in volatile memory, a plurality of message caches, each message cache corresponding to a shard of the plurality of shards; determining whether memory pressure is detected based on memory usage of the volatile memory; wherein enqueueing a specific message from the first enqueuer in the first shard comprises: responsive to not detecting memory pressure: storing the specific message in a row of the queue table that is assigned to the first shard; andstoring the specific message in a first message cache of the plurality of message caches, the first message cache corresponding to the first shard;responsive to detecting memory pressure, storing the specific message in a row of the queue table that is assigned to the first shard without storing the specific message in the first message cache; causing subscribers of the sharded queue to dequeue messages from the plurality of shards; wherein the method is performed by one or more computing devices.
地址 Redwood Shores CA US