You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Aniruddha (JIRA)" <ji...@apache.org> on 2012/09/13 02:19:07 UTC
[jira] [Created] (BOOKKEEPER-403) ReReadMetadataCb is not executed
in the thread responsible for that ledger
Aniruddha created BOOKKEEPER-403:
------------------------------------
Summary: ReReadMetadataCb is not executed in the thread responsible for that ledger
Key: BOOKKEEPER-403
URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
Project: Bookkeeper
Issue Type: Bug
Components: bookkeeper-client
Affects Versions: 4.2.0
Reporter: Aniruddha
Assignee: Aniruddha
Fix For: 4.2.0
Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] (BOOKKEEPER-403) ReReadMetadataCb is not executed
in the thread responsible for that ledger
Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Kelly updated BOOKKEEPER-403:
----------------------------------
Attachment: BOOKKEEPER-403.diff
New patch addresses Rakesh's comments.
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] [Commented] (BOOKKEEPER-403) ReReadMetadataCb is not
executed in the thread responsible for that ledger
Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455661#comment-13455661 ]
Sijie Guo commented on BOOKKEEPER-403:
--------------------------------------
new patch looks good. +1
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Ivan Kelly
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] [Commented] (BOOKKEEPER-403) ReReadMetadataCb is not
executed in the thread responsible for that ledger
Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454978#comment-13454978 ]
Aniruddha commented on BOOKKEEPER-403:
--------------------------------------
Thanks Ivan. The patch looks good.
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] (BOOKKEEPER-403) ReReadMetadataCb is not executed
in the thread responsible for that ledger
Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Kelly updated BOOKKEEPER-403:
----------------------------------
Attachment: BOOKKEEPER-403.diff
I was chatting to Sijie earlier about how this is a more general problem. Basically, we submit callbacks to the LedgerManager which, in normal operation run in the ZK callback thread. I proposed we create a wrapper around GenericCallback, which, when passed to the LedgerManager, will run the callback in the correct thread. The attached patch implements this.
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] (BOOKKEEPER-403) ReReadMetadataCb is not executed
in the thread responsible for that ledger
Posted by "Aniruddha (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aniruddha updated BOOKKEEPER-403:
---------------------------------
Attachment: BK-403.patch
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] [Commented] (BOOKKEEPER-403) ReReadMetadataCb is not
executed in the thread responsible for that ledger
Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454909#comment-13454909 ]
Sijie Guo commented on BOOKKEEPER-403:
--------------------------------------
the patch looks good for me. +1.
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] [Commented] (BOOKKEEPER-403) ReReadMetadataCb is not
executed in the thread responsible for that ledger
Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455667#comment-13455667 ]
Rakesh R commented on BOOKKEEPER-403:
-------------------------------------
Thanks Ivan for the patch. Looking good +1
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Ivan Kelly
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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] [Commented] (BOOKKEEPER-403) ReReadMetadataCb is not
executed in the thread responsible for that ledger
Posted by "Rakesh R (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BOOKKEEPER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454939#comment-13454939 ]
Rakesh R commented on BOOKKEEPER-403:
-------------------------------------
Hi Ivan, its nice idea of abstraction and looks good. Just few comments:
- @Override tag is missing in OrderedSafeGenericCallback implemetation
{code}
public final void operationComplete(final int rc, final T result) {
executor.submitOrdered(orderingKey, new SafeRunnable() {
{code}
- I feel, following places also could use OrderedSafeGenericCallback. Whats your opinion?
{code}
LedgerOpenOp.public void operationComplete(int rc, LedgerMetadata metadata)
LedgerHandle.
rereadMetadata(new GenericCallback<LedgerMetadata>() {
@Override
public void operationComplete(int rc, LedgerMetadata newMeta) {
if (rc != BKException.Code.OK) {
cb.operationComplete(rc, null);
} else {
metadata = newMeta;
recover(cb);
}
{code}
> ReReadMetadataCb is not executed in the thread responsible for that ledger
> --------------------------------------------------------------------------
>
> Key: BOOKKEEPER-403
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-403
> Project: Bookkeeper
> Issue Type: Bug
> Components: bookkeeper-client
> Affects Versions: 4.2.0
> Reporter: Aniruddha
> Assignee: Aniruddha
> Fix For: 4.2.0
>
> Attachments: BK-403.patch, BOOKKEEPER-403.diff
>
>
> Attached a patch to execute the callback in bk.mainWorkerPool instead of on the zookeeper thread.
--
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