You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "Advaitgaur004 (via GitHub)" <gi...@apache.org> on 2025/01/20 21:00:41 UTC
[PR] Correct logic in message delivery and directory management [dubbo-python]
Advaitgaur004 opened a new pull request, #42:
URL: https://github.com/apache/dubbo-python/pull/42
## What is the purpose of the change
1. Removes redundant status check in SingleMessageDeliverer.get_nowait()
2. Corrects dictionary key checking in cluster directories
## Brief changelog
- `src/dubbo/deliverers.py`:
- Removed redundant status check in get_nowait() method
- Improved state transition logic
- `src/dubbo/cluster/directories.py`:
- Fixed incorrect dictionary key checking from `.items()` to direct key lookup
## Verifying this change
1. Manual Testing
- Tested message delivery with various status combinations
- Verified directory updates with multiple URLs
## Checklist
- [x] Each commit in the pull request should have a meaningful subject line and body.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] GitHub Actions also works fine on my and this branch.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "Advaitgaur004 (via GitHub)" <gi...@apache.org>.
Advaitgaur004 commented on code in PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#discussion_r1923531183
##########
src/dubbo/deliverers.py:
##########
@@ -208,13 +208,9 @@ def get_nowait(self) -> Any:
if self._status is DelivererStatus.FINISHED:
self._status = DelivererStatus.PENDING
return self._message
-
- # raise error
- if self._status is DelivererStatus.FINISHED:
Review Comment:
okay i'll do that
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ merged PR #42:
URL: https://github.com/apache/dubbo-python/pull/42
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "Advaitgaur004 (via GitHub)" <gi...@apache.org>.
Advaitgaur004 commented on code in PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#discussion_r1922842875
##########
src/dubbo/cluster/directories.py:
##########
@@ -46,7 +46,7 @@ def notify(self, urls: list[URL]) -> None:
# create new invokers
for url in urls:
k = str(url)
- if k in old_invokers.items():
Review Comment:
Incorrect as items() return a list of tuples.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "cnzakii (via GitHub)" <gi...@apache.org>.
cnzakii commented on code in PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#discussion_r1923521876
##########
src/dubbo/deliverers.py:
##########
@@ -208,13 +208,9 @@ def get_nowait(self) -> Any:
if self._status is DelivererStatus.FINISHED:
self._status = DelivererStatus.PENDING
return self._message
-
- # raise error
- if self._status is DelivererStatus.FINISHED:
Review Comment:
You're right, but the entire `delivers` module has been deprecated and is no longer referenced by any other module. Could you please remove the entire module?
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "Advaitgaur004 (via GitHub)" <gi...@apache.org>.
Advaitgaur004 commented on code in PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#discussion_r1922843499
##########
src/dubbo/deliverers.py:
##########
@@ -208,13 +208,9 @@ def get_nowait(self) -> Any:
if self._status is DelivererStatus.FINISHED:
self._status = DelivererStatus.PENDING
return self._message
-
- # raise error
- if self._status is DelivererStatus.FINISHED:
Review Comment:
Redundant, as it never entered this block if the previous condition is true; therefore, this block statement is impossible.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "Advaitgaur004 (via GitHub)" <gi...@apache.org>.
Advaitgaur004 commented on PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#issuecomment-2604332113
@AlbumenJ @cnzakii Have a look.
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Correct logic in message delivery and directory management [dubbo-python]
Posted by "Advaitgaur004 (via GitHub)" <gi...@apache.org>.
Advaitgaur004 commented on PR #42:
URL: https://github.com/apache/dubbo-python/pull/42#issuecomment-2604472857
`find . -type f -name "test_*.py" -exec grep -l "deliverers" {} \;` gives nothing as not test refer this module.
- [x] No other module imports or uses it
- [x] Its functionality (message delivery) is handled by other mechanisms
- [x] No tests reference it
- [x] No configuration uses it
- [x] Not mentioned in examples or documentation
#42 Updated
Safely Removed `deliverers` module
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org