Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Experimental support to detect unconsumed data#2013

Merged
michael-grunder merged 3 commits into
developfrom
improved-liveness-detection-rebase
Oct 5, 2021
Merged

Experimental support to detect unconsumed data#2013
michael-grunder merged 3 commits into
developfrom
improved-liveness-detection-rebase

Conversation

@michael-grunder

Copy link
Copy Markdown
Member

This commit is an attempt at detecting unconsumed data on a socket when
we pull it from the connection pool.

Two new INI settings are introduced related to the changes:

redis.pconnect.pool_detect_dirty:

Value Explanation


0 Don't execute new logic at all.
1 Abort and close the socket if we find unconsumed bytes in the
  read buffer.
2 Seek to the end of our read buffer if we find unconsumed bytes
  and then poll the socket FD to detect if we're still readable
  in which case we fail and close the socket.

redis.pconnect.pool_poll_timeout:

The poll timeout to employ when checking if the socket is readable.
This value is in milliseconds and can be zero.

This commit is an attempt at detecting unconsumed data on a socket when
we pull it from the connection pool.

Two new INI settings are introduced related to the changes:

redis.pconnect.pool_detect_dirty:

Value Explanation
----- ----------------------------------------------------------------
    0 Don't execute new logic at all.
    1 Abort and close the socket if we find unconsumed bytes in the
      read buffer.
    2 Seek to the end of our read buffer if we find unconsumed bytes
      and then poll the socket FD to detect if we're still readable
      in which case we fail and close the socket.

redis.pconnect.pool_poll_timeout:

The poll timeout to employ when checking if the socket is readable.
This value is in milliseconds and can be zero.
Comment thread library.c Outdated
Comment thread library.c Outdated
Comment thread library.c Outdated
@michael-grunder michael-grunder added this to the 5.3.5 milestone Sep 28, 2021
@michael-grunder michael-grunder merged commit 42e69d8 into develop Oct 5, 2021
@michael-grunder michael-grunder deleted the improved-liveness-detection-rebase branch October 5, 2021 15:31
michael-grunder added a commit that referenced this pull request Oct 5, 2021
This commit is an attempt at detecting unconsumed data on a socket when
we pull it from the connection pool.

Two new INI settings are introduced related to the changes:

redis.pconnect.pool_detect_dirty:

Value Explanation
----- ----------------------------------------------------------------
    0 Don't execute new logic at all.
    1 Abort and close the socket if we find unconsumed bytes in the
      read buffer.
    2 Seek to the end of our read buffer if we find unconsumed bytes
      and then poll the socket FD to detect if we're still readable
      in which case we fail and close the socket.

redis.pconnect.pool_poll_timeout:

The poll timeout to employ when checking if the socket is readable.
This value is in milliseconds and can be zero.

Review changes

See #2013

Perform cheaper PHP liveness check first.
michael-grunder added a commit that referenced this pull request Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants