You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/23 14:29:55 UTC

[GitHub] [pulsar] ZiyaoWei opened a new issue #14821: TableViewImpl leaking internal state via accessors

ZiyaoWei opened a new issue #14821:
URL: https://github.com/apache/pulsar/issues/14821


   **Describe the bug**
   
   
   Currently TableViewImpl methods that access the underlying map, e.g., TableViewImpl::KeySet() (https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/TableViewImpl.java#L141) returns views of the underlying map, which means users could modify the returned value and accidentally change the internal state of TableViewImpl.
   
   **To Reproduce**
   
   If we remove a key from the KeySet in `TableViewTest::testTableView`, the test would fail.
   
   **Expected behavior**
   
   Modifying the returned key set/values/etc. shouldn't change the internal state of the TableViewImpl.
   
   **Additional context**
   
   We should probably fix it before people start relying on this behavior :-)


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui closed issue #14821: TableViewImpl leaking internal state via accessors

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #14821:
URL: https://github.com/apache/pulsar/issues/14821


   


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] Technoboy- commented on issue #14821: TableViewImpl leaking internal state via accessors

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #14821:
URL: https://github.com/apache/pulsar/issues/14821#issuecomment-1076989702


   > cc: @nlu90 since we discussed this via Slack
   
   I will work on this.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] ZiyaoWei commented on issue #14821: TableViewImpl leaking internal state via accessors

Posted by GitBox <gi...@apache.org>.
ZiyaoWei commented on issue #14821:
URL: https://github.com/apache/pulsar/issues/14821#issuecomment-1076443958


   cc: @nlu90 since we discussed this via Slack


-- 
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: commits-unsubscribe@pulsar.apache.org

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