You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Daniel Lescohier (Created) (JIRA)" <ji...@apache.org> on 2011/12/01 22:54:40 UTC
[jira] [Created] (ZOOKEEPER-1314) improve zkpython synchronous api
implementation
improve zkpython synchronous api implementation
-----------------------------------------------
Key: ZOOKEEPER-1314
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
Project: ZooKeeper
Issue Type: Improvement
Components: contrib-bindings
Affects Versions: 3.3.3
Reporter: Daniel Lescohier
Priority: Minor
Improves the following items in zkpython which are related to the Zookeeper synchronous API:
# For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
# For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
I will attach the patch shortly.
--
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] (ZOOKEEPER-1314) improve zkpython synchronous api
implementation
Posted by "Mahadev konar (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-1314:
-------------------------------------
Assignee: Daniel Lescohier
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Assignee: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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] [Commented] (ZOOKEEPER-1314) improve zkpython synchronous
api implementation
Posted by "Henry Robinson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166457#comment-13166457 ]
Henry Robinson commented on ZOOKEEPER-1314:
-------------------------------------------
Hi Daniel -
Looks good, I didn't know about Py_BEGIN_ALLOW_THREADS!
Just one comment:
{code}
if (err != ZOK) {
PyErr_SetString(err_to_exception(err), zerror(err));
- return NULL;
+ goto cleanup;
}
- return Py_BuildValue("s", realbuf);
+ returnval = Py_BuildValue("s", realbuf);
+cleanup:
+ free(realbuf);
+ return returnval;
{code}
I'd prefer:
{code}
if (err != ZOK) {
PyErr_SetString(err_to_exception(err), zerror(err));
} else {
returnval = Py_BuildValue("s", realbuf);
}
+ free(realbuf);
+ return returnval;
{code}
if that's functionally equivalent.
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Assignee: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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] (ZOOKEEPER-1314) improve zkpython synchronous api
implementation
Posted by "Daniel Lescohier (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Lescohier updated ZOOKEEPER-1314:
----------------------------------------
Attachment: ZOOKEEPER-1314.patch
Notes on the implementation:
# int err is declared earlier in the function, because Py_BEGIN_ALLOW_THREADS opens a block, and we need access to the err variable outside that block.
# The zookeeper handle is copied to a local variable in the function so that we're not using a global variable while the GIL is released.
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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] [Commented] (ZOOKEEPER-1314) improve zkpython synchronous
api implementation
Posted by "Mahadev konar (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164887#comment-13164887 ]
Mahadev konar commented on ZOOKEEPER-1314:
------------------------------------------
@Henry,
Can you please review this patch?
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Assignee: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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] [Commented] (ZOOKEEPER-1314) improve zkpython synchronous
api implementation
Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161250#comment-13161250 ]
Hadoop QA commented on ZOOKEEPER-1314:
--------------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12505816/ZOOKEEPER-1314.patch
against trunk revision 1208979.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/801//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/801//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/801//console
This message is automatically generated.
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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] [Commented] (ZOOKEEPER-1314) improve zkpython synchronous
api implementation
Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162341#comment-13162341 ]
Hadoop QA commented on ZOOKEEPER-1314:
--------------------------------------
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12505816/ZOOKEEPER-1314.patch
against trunk revision 1208979.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 3 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/802//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/802//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/802//console
This message is automatically generated.
> improve zkpython synchronous api implementation
> -----------------------------------------------
>
> Key: ZOOKEEPER-1314
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1314
> Project: ZooKeeper
> Issue Type: Improvement
> Components: contrib-bindings
> Affects Versions: 3.3.3
> Reporter: Daniel Lescohier
> Priority: Minor
> Attachments: ZOOKEEPER-1314.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Improves the following items in zkpython which are related to the Zookeeper synchronous API:
> # For pyzoo_create, no longer limit the returned znode name to 256 bytes; dynamically allocate memory on the heap.
> # For all the synchronous api calls, release the Python Global Interpreter Lock just before doing the synchronous call.
> I will attach the patch shortly.
--
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