[ 
https://issues.apache.org/jira/browse/HBASE-28934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wellington Chevreuil updated HBASE-28934:
-----------------------------------------
    Description: 
When persistent bucket cache is enabled, bucket cache needs to read and load 
the persistent cache file contents during region server starting time. This 
cache initialisation is currently asynchronous. The server restart completes 
after spawning a thread to initialise the cache.

When the subsequent HFile readers are created, the current implementation is 
such that the constructor of the hfile (HFilePreadReader) waits until the cache 
is initialised. Due to this wait, all client requests to these regions would 
fail during the whole cache initialisation period, as these regions are not yet 
online.

The correct way to handle this is that, the constructors of HFile readers 
should not wait for cache initialisation. Only the prefetch threads should wait 
for the cache initialisation.

Subsequently, any client requests should be served by accessing the underlying 
file system if the cache is not yet initialised, and a cache miss should be 
computed in the cache stats.

Thanks,

Janardhan

  was:
The bucket cache is initialised from the persistent cache file during server 
restarts. This cache initialisation is asynchronous to the server restarts. The 
server restart completes after spawning a thread to initialise the cache.

When the subsequent HFile readers are created, the current implementation is 
such that the constructor of the hfile (HFilePreadReader) waits until the cache 
is initialised. Due to this wait, all requests to these regions are blocked due 
to cache initialisation. Even the errors related to "regions are not online" is 
returned to the client.

The correct way to handle this is that, the constructors of HFile readers 
should not wait for cache initialisation. Only the prefetch threads should wait 
for the cache initialisation.
Subsequently, any client requests should be served by accessing the data main 
storage (cloud storage) if the cache is not yet initialised.

Thanks,

Janardhan


> The HFile Reader creation should not be blocked due to waits for cache 
> initialisation.
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-28934
>                 URL: https://issues.apache.org/jira/browse/HBASE-28934
>             Project: HBase
>          Issue Type: Bug
>          Components: BucketCache
>            Reporter: Janardhan Hungund
>            Assignee: Janardhan Hungund
>            Priority: Major
>
> When persistent bucket cache is enabled, bucket cache needs to read and load 
> the persistent cache file contents during region server starting time. This 
> cache initialisation is currently asynchronous. The server restart completes 
> after spawning a thread to initialise the cache.
> When the subsequent HFile readers are created, the current implementation is 
> such that the constructor of the hfile (HFilePreadReader) waits until the 
> cache is initialised. Due to this wait, all client requests to these regions 
> would fail during the whole cache initialisation period, as these regions are 
> not yet online.
> The correct way to handle this is that, the constructors of HFile readers 
> should not wait for cache initialisation. Only the prefetch threads should 
> wait for the cache initialisation.
> Subsequently, any client requests should be served by accessing the 
> underlying file system if the cache is not yet initialised, and a cache miss 
> should be computed in the cache stats.
> Thanks,
> Janardhan



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to