[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-09-27 Thread stack (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HBASE-5329:
-

Resolution: Fixed
Status: Resolved  (was: Patch Available)

Patch was applied a while back.

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Assignee: Ian Varley
Priority: Minor
 Fix For: 0.96.0

 Attachments: 5329-v2.patch, HBASE-5329.patch


 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-08-22 Thread Ian Varley (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ian Varley updated HBASE-5329:
--

Attachment: HBASE-5329.patch

Simple patch to use putIfAbsent

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Assignee: Zhihong Ted Yu
Priority: Minor
 Attachments: HBASE-5329.patch


 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-08-22 Thread Zhihong Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhihong Ted Yu updated HBASE-5329:
--

Attachment: 5329-v2.patch

Patch v2 does some cosmetics changes based on Ian's patch.

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Assignee: Zhihong Ted Yu
Priority: Minor
 Fix For: 0.96.0

 Attachments: 5329-v2.patch, HBASE-5329.patch


 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-08-22 Thread Zhihong Ted Yu (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhihong Ted Yu updated HBASE-5329:
--

Fix Version/s: 0.96.0
   Status: Patch Available  (was: Open)

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Assignee: Zhihong Ted Yu
Priority: Minor
 Fix For: 0.96.0

 Attachments: 5329-v2.patch, HBASE-5329.patch


 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-02-10 Thread liaoxiangui (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liaoxiangui updated HBASE-5329:
---

Priority: Minor  (was: Critical)

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Assignee: Zhihong Yu
Priority: Minor

 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5329) addRowLock() may allocate duplicate lock id, causing the client to be blocked

2012-02-03 Thread Zhihong Yu (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhihong Yu updated HBASE-5329:
--

Summary: addRowLock() may allocate duplicate lock id, causing the client to 
be blocked  (was: when client call lockRow,region server may allocate 
duplicated lock id, this may cause that client  is blocked.)

 addRowLock() may allocate duplicate lock id, causing the client to be blocked
 -

 Key: HBASE-5329
 URL: https://issues.apache.org/jira/browse/HBASE-5329
 Project: HBase
  Issue Type: Bug
  Components: regionserver
Affects Versions: 0.90.3
 Environment: Red Hat Enterprise Linux Server release 5.4 
Reporter: liaoxiangui
Priority: Critical

 {code}
 protected long addRowLock(Integer r, HRegion region) throws 
 LeaseStillHeldException
 {
   long lockId = -1L;
   lockId = rand.nextLong();   //!!!may generate duplicated 
 id,bug?
   String lockName = String.valueOf(lockId);
   rowlocks.put(lockName, r);
   this.leases.createLease(lockName, new RowLockListener(lockName, 
 region));
   return lockId;
 }
 {code}
 In addRowLock(),rand may generate duplicated lock id, it may cause 
 regionserver throw exception(Leases$LeaseStillHeldException).The client will 
 be blocked until old rowlock is released.
 {code}
 2012-02-03 15:21:50,084 ERROR 
 org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock 
 (fsOk: true)
 org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException
 at 
 org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986)
 at 
 org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
 at 
 org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira