We have different priority in RPC level, we can even separate write
requests and read requests to different handlers. But, yes, the WAL uses
FIFO queue, and even more, we use a single thread to consume the append and
sync requests. The reason is that we need to keep the sequenceID of WAL
entry to increase monotonically, otherwise, data will can be loss when
replaying or replicating. The sequenceID is assigned when the WAL entry was
queued, it is impossible to serve a 'priority' request comes later without
breaking the order. However, if requests are from different table, I think
you can add a new WALProvider to separate the table's WAL from others to
achieve better Isolation.
Best Regards
Allan Yang


Jing Liu <[email protected]> 于2018年11月8日周四 上午5:49写道:

> Hi,
>
> I'am trying to add priority to schedule different types of requests in
> HBase. But the Write-ahead logging use RingBuffer which
> is essentially a FIFO queue makes it hard. In this case, let's say if the
> low priority request already queued in the RingBuffer, the high priority
> request can not be executed before all those queued low priority request.
> I'm wondering if I change the FIFO queue into Priority-based queue
> will violate the write consistency guarantee or other issues?
>
> Thanks,
> Jing
>

Reply via email to