-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix: cancel filesystem traversal when listing request cancelled #672
Conversation
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.
Do you want to add a unit test case for the cancellation of a dir walk?
Thats a good idea, but the "testing/fstest" doesn't seem to have a good way to add delays in the stat or readdir implementations. I guess we could fork this and add our own, but not sure its worth the added complexity? |
I think you can overload the
|
db813d4
34beabd
to
db813d4
Compare
oh, nice test! ok, yeah I can add this in |
For large directories, the treewalk can take longer than the client request timeout. If the client times out the request then we need to stop walking the filesystem and just return the context error. This should prevent the gateway from consuming system resources uneccessarily after an incoming request is terminated.
db813d4
to
a8adb47
Compare
For large directories, the treewalk can take longer than the client request timeout. If the client times out the request then we need to stop walking the filesystem and just return the context error.
This should prevent the gateway from consuming system resources uneccessarily after an incoming request is terminated.