-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-112740: Removed buffer size limit for AF_RDS #116652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
gh-112740: Removed buffer size limit for AF_RDS #116652
Conversation
The preset buffer length threshold of 1024 bytes falls short for AF_RDS sockets because each RDS connection has a minimum size of 92 bytes. This limitation restricts us to managing merely around 1024/92 ~ 11 connections. In practical terms, this is inadequate, considering there are machines that manage hundreds of connections. This patch addresses the issue by initially setting the buflen argument to 0 when calling getsockopt function, which consequently returns the necessary buffer length. Subsequently, a buffer of the returned size is created for the next getsockopt call, allowing us to retrieve the full buffer without being constrained by the threshold limit. In addition, the existing implementation overlooks the return value from the kernel's getsockopt function. However, this return value is critical for decoding the buffer data emanating from the AF_RDS sockets. To address this, I propose a solution that involves appending the return value to the buffer specifically for AF_RDS sockets. Signed-off-by: Mohith Kumar Thummaluru <mohith.k.kumar.thummaluru@oracle.com>
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
The preset buffer length threshold of 1024 bytes falls short for AF_RDS sockets because each RDS connection has a minimum size of 92 bytes. This limitation restricts us to managing merely around 1024/92 ~ 11 connections. In practical terms, this is inadequate, considering there are machines that manage hundreds of connections. This patch addresses the issue by initially setting the buflen argument to 0 when calling getsockopt function, which consequently returns the necessary buffer length. Subsequently, a buffer of the returned size is created for the next getsockopt call, allowing us to retrieve the full buffer without being constrained by the threshold limit. In addition, the existing implementation overlooks the return value from the kernel's getsockopt function. However, this return value is critical for decoding the buffer data emanating from the AF_RDS sockets. To address this, I propose a solution that involves appending the return value to the buffer specifically for AF_RDS sockets. Signed-off-by: Mohith Kumar Thummaluru <mohith.k.kumar.thummaluru@oracle.com>
|
Hi, Could you please let me know if there are any comments. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some general formatting nitpicks -- it's good to go for PEP 7 compliance on new code.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
Not sure why CI is failing all of a sudden. |
The preset buffer length threshold of
1024bytes falls short forAF_RDSsockets because each RDS connection has a minimum size of92bytes. This limitation restricts us to managing merely around1024/92 ~ 11connections. In practical terms, this is inadequate, considering there are machines that manage hundreds of connections.This patch addresses the issue by initially setting the
buflenargument to0when callinggetsockopt(), which consequently returns the necessary buffer length. Subsequently, a buffer of the returned size is created for the nextgetsockopt()call, allowing us to retrieve the full buffer without being constrained by the threshold limit.In addition, the existing implementation overlooks the return value from the kernel's getsockopt function. However, this return value is critical for decoding the buffer data emanating from the
AF_RDSsockets. To address this, I propose a solution that involves appending the return value to the buffer specifically forAF_RDSsockets.sock_getsockopt#112740