geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (GEODE-3774) Remove double-checked Locking in New Client Protocol code
Date Tue, 17 Oct 2017 17:51:00 GMT


ASF subversion and git services commented on GEODE-3774:

Commit 397daecb4627292afacc20449a4ecb31e8c019c6 in geode's branch refs/heads/develop from
[;h=397daec ]

GEODE-3774: moved service loader initialization around to avoid double-check locking

> Remove double-checked Locking in New Client Protocol code
> ---------------------------------------------------------
>                 Key: GEODE-3774
>                 URL:
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Galen O'Sullivan
>            Assignee: Udo Kohlmeyer
> {{ServerConnectionFactory}} uses double-checked locking for loading the services it depends
on. This idiom is fundamentally broken.
> Even marking the field that's locked this way {{volatile}} may not resolve the issue,
as the object itself could be read as uninitialized even if the field (reference) isn't. I
don't really know the JMM well enough to be sure that it's broken, but that's a good sign
that we shouldn't do it unless we really need to for performance reasons (and even then...)
> This may be best to resolve after GEODE-3751 and GEODE-3739 due to the changes to loading
those refactors will bring.
> While we're at it, we should assert that there is only one client protocol service, because
we can't handle two and which one we choose is undefined.

This message was sent by Atlassian JIRA

View raw message