hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: When should we use volatile modifier in HMaster?
Date Fri, 15 Mar 2019 04:39:19 GMT
On Thu, Mar 14, 2019 at 12:34 AM yuhang li <893891140li@gmail.com> wrote:

> Hi all, I'm developing some new features based on HBase-1.2.9

Its best to develop against master first and then we backport to other

You've seen announcements that hbase-1.2 is sunsetting.... that it'll be
EOL'd in the not too distant future?

> and found  a
> weird thing that´╝î in class HMaster some properties are volatile, while
> others are not volatile and I haven't found any  synchronization for them.
> As far as I know, volatile is use to to guarantee visibility among multiple
> threads. There is no doubt HMaster is accessed by many threads. So, why
> there are only a small part of variables are volatile?

Maybe paste an example of what you think a problematic use of volatile?
That might be the best way to proceed. If non-volatile, then my guess is it
is a property that is written on single-threaded startup and not changed
ahead of the rest-of-all threads starting.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message