redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

sentinel: broken weakref on destruction

Open jasonk opened this issue 10 months ago • 7 comments

Pull Request check-list

Please make sure to review and check all of these items:

  • [ ] Do tests and lints pass with this change?
  • [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • [ ] Is the new or changed code fully tested?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [ ] Is there an example added to the examples folder (if applicable)?
  • [ ] Was the change added to CHANGES file?

Description of change

This is basically just a copy of the changes that were made in #2771 to fix the problem reported in #2767, which only fixed the sync Sentinel. This is just the same changes applied to the async Sentinel.

jasonk avatar Apr 16 '24 22:04 jasonk

Can this please be merged? I have the exact same problem as reported in #2767, but I'm using the async sentinel, so that the fix provided in #2771 does not help.

mdomke avatar May 31 '24 08:05 mdomke

@gerzse, can this please be merged and included in a release?

rad-pat avatar Jun 10 '24 08:06 rad-pat

+1

WolfEYc avatar Jun 12 '24 19:06 WolfEYc

@gerzse, can you please take a look, or comment if the patch is no good? These Tracebacks just pollute my logs. I would rather be able to upgrade redis-py that have to downgrade to get rid of these

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists
Exception ignored in: <function AbstractConnection.__del__ at 0x7bacb7111ee0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/connection.py", line 214, in __del__
  File "/usr/local/lib/python3.11/site-packages/redis/asyncio/sentinel.py", line 33, in __repr__
ReferenceError: weakly-referenced object no longer exists

rad-pat avatar Jun 20 '24 10:06 rad-pat

+1

KyMaP13 avatar Jul 12 '24 09:07 KyMaP13

Im getting the error too, please take a look at PR

KostyaLukyanchikov avatar Aug 12 '24 14:08 KostyaLukyanchikov

I inadvertently did the same thing in this pull request: https://github.com/redis/redis-py/pull/3321

DABND19 avatar Aug 16 '24 08:08 DABND19