accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-4641) Modify BlockCache interface to avoid race conditions
Date Wed, 06 Dec 2017 00:42:00 GMT


Christopher Tubbs commented on ACCUMULO-4641:

Is this issue complete? The PR appears to have been merged.

> Modify BlockCache interface to avoid race conditions
> ----------------------------------------------------
>                 Key: ACCUMULO-4641
>                 URL:
>             Project: Accumulo
>          Issue Type: Sub-task
>            Reporter: Keith Turner
>            Assignee: Keith Turner
>              Labels: pull-request-available
>             Fix For: 2.0.0
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
> Currently the BlockCache interface has functions to get and put.  Accumulo will try to
get a block, if it does not exist load it, and then put it in the cache.  This can lead to
race conditions where multiple threads unnecessarily load the same block.
> I think it would be better to modify the block cache interface to only have a function
like the following.  
> {code:java}
>   CacheEntry get(String blockName, BlockLoader loader)
> {code} 
> BlockLoader represents a function that the cache can call if a block is not present.
 The cache implementation can attempt to handle load race conditions however it likes..

This message was sent by Atlassian JIRA

View raw message