[
https://issues.apache.org/jira/browse/HBASE-12145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155548#comment-14155548
]
Andrew Purtell commented on HBASE-12145:
----------------------------------------
Can we split out the Javadoc and annotations to this issue and file others
where it looks like a correctness problem. For the latter i.e.
{code}
@@ -416,7 +418,7 @@ public class RpcRetryingCallerWithReadReplicas {
public QueueingFuture take() throws InterruptedException {
synchronized (tasks) {
- if (completed == null) tasks.wait();
+ while (completed == null) tasks.wait();
}
return completed;
}
{code}
and
{code}
@@ -690,23 +692,23 @@ public class RecoverableZooKeeper {
return newData;
}
- public long getSessionId() {
- return zk == null ? null : zk.getSessionId();
+ public synchronized long getSessionId() {
+ return zk == null ? -1 : zk.getSessionId();
}
- public void close() throws InterruptedException {
+ public synchronized void close() throws InterruptedException {
if (zk != null) zk.close();
}
- public States getState() {
+ public synchronized States getState() {
return zk == null ? null : zk.getState();
}
- public ZooKeeper getZooKeeper() {
+ public synchronized ZooKeeper getZooKeeper() {
return zk;
}
- public byte[] getSessionPasswd() {
+ public synchronized byte[] getSessionPasswd() {
return zk == null ? null : zk.getSessionPasswd();
}
{code}
> Fix javadoc and findbugs so new folks aren't freaked when they see them
> -----------------------------------------------------------------------
>
> Key: HBASE-12145
> URL: https://issues.apache.org/jira/browse/HBASE-12145
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: stack
> Attachments: 12145.txt, 12145v2.txt
>
>
> Misc set of fixes to get these attributes green again.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)