accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2270) bulk import thread pool initialized in non-static method.
Date Mon, 03 Mar 2014 16:25:25 GMT


Bill Havanki commented on ACCUMULO-2270:

That method should definitely be made {{static}} and {{private}}. However, more work needs
to be done here, because there is a reference to {{threadPool}} in the {{call()}} method that
is not thread-safe. Even though creation of the thread pool is synchronized, another thread
may see the pool in a partially constructed state. The [lazy initialization holder class idiom|]
should be used here.

This wouldn't have been an issue in 1.4 because static code blocks give you safe publication.

> bulk import thread pool initialized in non-static method.
> ---------------------------------------------------------
>                 Key: ACCUMULO-2270
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.5.0
>            Reporter: Keith Turner
>            Assignee: Vikram Srivastava
>         Attachments: ACCUMULO-2270.v1.patch.txt
> In 1.5 org.apache.accumulo.server.master.tableOps.BulkImport.LoadFiles has a static thread
pool. This static thread pool is initialized with a non-static syncronized method.  1.4 initializes
in a static code block.

This message was sent by Atlassian JIRA

View raw message