You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "hyongtao-code (via GitHub)" <gi...@apache.org> on 2026/05/19 13:03:53 UTC

[PR] Fix hasListeners() always returning true when no event listeners configured [polaris]

hyongtao-code opened a new pull request, #4493:
URL: https://github.com/apache/polaris/pull/4493

   Long log:
   
    - Change `enabledEventTypes` initialization from `EnumSet.allOf()` to `EnumSet.noneOf()` to fix incorrect `hasListeners()` behavior
    - Add backward compatibility: when no listeners are explicitly configured, enable all event types
   
    BTW, the original code won’t cause any bugs, but it will make the `PolarisEventListeners` class lose its configurability.
   
   Signed-off-by : Yongtao Huang <yo...@gmail.com>
   
   <!--
   πŸ“ Describe what changes you're proposing, especially breaking or user-facing changes. 
   πŸ“– See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
   -->
   
   ## Checklist
   - [ ] πŸ›‘οΈ Don't disclose security issues! (contact security@apache.org)
   - [ ] πŸ”— Clearly explained why the changes are needed, or linked related issues: Fixes #
   - [ ] πŸ§ͺ Added/updated tests with good coverage, or manually tested (and explained how)
   - [ ] πŸ’‘ Added comments for complex logic
   - [ ] 🧾 Updated `CHANGELOG.md` (if needed)
   - [ ] πŸ“š Updated documentation in `site/content/in-dev/unreleased` (if needed)
   


-- 
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@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix hasListeners() always returning true when no event listeners configured [polaris]

Posted by "hyongtao-code (via GitHub)" <gi...@apache.org>.
hyongtao-code closed pull request #4493: Fix hasListeners() always returning true when no event listeners configured
URL: https://github.com/apache/polaris/pull/4493


-- 
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@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix hasListeners() always returning true when no event listeners configured [polaris]

Posted by "hyongtao-code (via GitHub)" <gi...@apache.org>.
hyongtao-code commented on PR #4493:
URL: https://github.com/apache/polaris/pull/4493#issuecomment-4488420247

   Hi, I was just a bit confused by this line of code:
   `enabledEventTypes = EnumSet.allOf(PolarisEventType.class);`
   It looks non-configurable to me. I also don't think there is actually a bug here.
   Thanks for your time! Close it.
   


-- 
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@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix hasListeners() always returning true when no event listeners configured [polaris]

Posted by "nandorKollar (via GitHub)" <gi...@apache.org>.
nandorKollar commented on PR #4493:
URL: https://github.com/apache/polaris/pull/4493#issuecomment-4488334215

   I'm not sure I completely understand this part: "Add backward compatibility: when no listeners are explicitly configured, enable all event types"
   
   This means that there's nobody listening for events, why do we need to enable any in this case?


-- 
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@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix hasListeners() always returning true when no event listeners configured [polaris]

Posted by "snazy (via GitHub)" <gi...@apache.org>.
snazy commented on PR #4493:
URL: https://github.com/apache/polaris/pull/4493#issuecomment-4488252217

   Hi @hyongtao-code, thanks for working on this!
   
   Mind elaborating why the current behavior is incorrect and what "backward compatibility" means in context of the recent 1.5.0 release?


-- 
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@polaris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org