You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sumitagrawl (via GitHub)" <gi...@apache.org> on 2023/04/17 11:48:05 UTC
[GitHub] [ozone] sumitagrawl opened a new pull request, #4578: HDDS-8418. Lease Manager unsafe method fix
sumitagrawl opened a new pull request, #4578:
URL: https://github.com/apache/ozone/pull/4578
## What changes were proposed in this pull request?
unsafe method was present where callback can be missed, is fixed by changing order of release and synchronization of method
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8418
## How was this patch tested?
UT case and IT for checking any impact
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 commented on a diff in pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4578:
URL: https://github.com/apache/ozone/pull/4578#discussion_r1327037193
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/EventWatcher.java:
##########
@@ -157,13 +146,14 @@ protected synchronized void handleCompletion(COMPLETION_PAYLOAD
}
}
- private synchronized void handleTimeout(EventPublisher publisher,
+ private synchronized Void handleTimeout(EventPublisher publisher,
Review Comment:
I didn't get this part, what is the impact of changing void-> Void and returning null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sumitagrawl commented on a diff in pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "sumitagrawl (via GitHub)" <gi...@apache.org>.
sumitagrawl commented on code in PR #4578:
URL: https://github.com/apache/ozone/pull/4578#discussion_r1331076726
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/EventWatcher.java:
##########
@@ -157,13 +146,14 @@ protected synchronized void handleCompletion(COMPLETION_PAYLOAD
}
}
- private synchronized void handleTimeout(EventPublisher publisher,
+ private synchronized Void handleTimeout(EventPublisher publisher,
Review Comment:
Callback as getting registered has return type is Callback with "Void" Object, so this gives error if return type mismatch,
Syntax for acquire: `public synchronized Lease<T> acquire(
T resource, Callable<Void> callback)`
Below is error if we keep void:
`Bad return type in lambda expression: void cannot be converted to Void`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 commented on a diff in pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4578:
URL: https://github.com/apache/ozone/pull/4578#discussion_r1331130919
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/EventWatcher.java:
##########
@@ -157,13 +146,14 @@ protected synchronized void handleCompletion(COMPLETION_PAYLOAD
}
}
- private synchronized void handleTimeout(EventPublisher publisher,
+ private synchronized Void handleTimeout(EventPublisher publisher,
Review Comment:
Got it , looks like autoboxing won't happen for void type. Thanks for explaining
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] szetszwo commented on pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "szetszwo (via GitHub)" <gi...@apache.org>.
szetszwo commented on PR #4578:
URL: https://github.com/apache/ozone/pull/4578#issuecomment-1551037700
The bug is the `acquire` methods returning a `Lease` and then `registerCallBack` later. It seems the current change does not prevent that. We should pass the callbacks to `acquire` at the same time in order to fix the bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 commented on pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on PR #4578:
URL: https://github.com/apache/ozone/pull/4578#issuecomment-1730882658
Thanks @sumitagrawl for the fix, @adoroszlai @szetszwo for reviewing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sadanand48 merged pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 merged PR #4578:
URL: https://github.com/apache/ozone/pull/4578
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #4578: HDDS-8418. Lease Manager unsafe method fix
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4578:
URL: https://github.com/apache/ozone/pull/4578#issuecomment-1511312001
@sumitagrawl [there are](https://github.com/sumitagrawl/ozone/actions/runs/4720770840) multiple test failures, please check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org