[jira] [Updated] (PHOENIX-4074) Race condition in LazyValueGetter
[ https://issues.apache.org/jira/browse/PHOENIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-4074: -- Labels: secondary_index (was: ) > Race condition in LazyValueGetter > - > > Key: PHOENIX-4074 > URL: https://issues.apache.org/jira/browse/PHOENIX-4074 > Project: Phoenix > Issue Type: Bug >Reporter: Samarth Jain >Assignee: Samarth Jain > Labels: secondary_index > Fix For: 4.12.0 > > Attachments: PHOENIX-4074.patch, PHOENIX-4074_v2.patch > > > There is a race condition between acquiring the lock and the values map being > initialized here. > {code} > @Override > public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws > IOException { > // ensure we have a backing map > if (values == null) { > synchronized (this) { > values = Collections.synchronizedMap(new HashMapImmutableBytesWritable>()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (PHOENIX-4074) Race condition in LazyValueGetter
[ https://issues.apache.org/jira/browse/PHOENIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-4074: -- Fix Version/s: 4.12.0 > Race condition in LazyValueGetter > - > > Key: PHOENIX-4074 > URL: https://issues.apache.org/jira/browse/PHOENIX-4074 > Project: Phoenix > Issue Type: Bug >Reporter: Samarth Jain > Fix For: 4.12.0 > > Attachments: PHOENIX-4074.patch, PHOENIX-4074_v2.patch > > > There is a race condition between acquiring the lock and the values map being > initialized here. > {code} > @Override > public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws > IOException { > // ensure we have a backing map > if (values == null) { > synchronized (this) { > values = Collections.synchronizedMap(new HashMapImmutableBytesWritable>()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (PHOENIX-4074) Race condition in LazyValueGetter
[ https://issues.apache.org/jira/browse/PHOENIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor updated PHOENIX-4074: -- Attachment: PHOENIX-4074_v2.patch Rebased your patch on top of mine. Will commit together with mine. > Race condition in LazyValueGetter > - > > Key: PHOENIX-4074 > URL: https://issues.apache.org/jira/browse/PHOENIX-4074 > Project: Phoenix > Issue Type: Bug >Reporter: Samarth Jain > Attachments: PHOENIX-4074.patch, PHOENIX-4074_v2.patch > > > There is a race condition between acquiring the lock and the values map being > initialized here. > {code} > @Override > public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws > IOException { > // ensure we have a backing map > if (values == null) { > synchronized (this) { > values = Collections.synchronizedMap(new HashMapImmutableBytesWritable>()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (PHOENIX-4074) Race condition in LazyValueGetter
[ https://issues.apache.org/jira/browse/PHOENIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-4074: -- Attachment: PHOENIX-4074.patch [~jamestaylor], please review. > Race condition in LazyValueGetter > - > > Key: PHOENIX-4074 > URL: https://issues.apache.org/jira/browse/PHOENIX-4074 > Project: Phoenix > Issue Type: Bug >Reporter: Samarth Jain > Attachments: PHOENIX-4074.patch > > > There is a race condition between acquiring the lock and the values map being > initialized here. > {code} > @Override > public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws > IOException { > // ensure we have a backing map > if (values == null) { > synchronized (this) { > values = Collections.synchronizedMap(new HashMapImmutableBytesWritable>()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (PHOENIX-4074) Race condition in LazyValueGetter
[ https://issues.apache.org/jira/browse/PHOENIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Samarth Jain updated PHOENIX-4074: -- Description: There is a race condition between acquiring the lock and the values map being initialized here. {code} @Override public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws IOException { // ensure we have a backing map if (values == null) { synchronized (this) { values = Collections.synchronizedMap(new HashMap()); } } {code} > Race condition in LazyValueGetter > - > > Key: PHOENIX-4074 > URL: https://issues.apache.org/jira/browse/PHOENIX-4074 > Project: Phoenix > Issue Type: Bug >Reporter: Samarth Jain > > There is a race condition between acquiring the lock and the values map being > initialized here. > {code} > @Override > public ImmutableBytesWritable getLatestValue(ColumnReference ref) throws > IOException { > // ensure we have a backing map > if (values == null) { > synchronized (this) { > values = Collections.synchronizedMap(new HashMap ImmutableBytesWritable>()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)