[Storage] forceCloseAllHandles on FileClient and DirectoryClient#5620
Conversation
| * @returns {Promise<number>} | ||
| * @memberof FileClient | ||
| */ | ||
| public async forceCloseAllHandles(options: FileForceCloseHandlesOptions = {}): Promise<number> { |
There was a problem hiding this comment.
Why not make it pageble like other segmement APIs?
An internal loop may cause "unresponsive" for large number of handles.
There was a problem hiding this comment.
In general we don't add paged async iterators for operations that do actions but not retrieving data. /cc @bterlson
There was a problem hiding this comment.
This was discussed and in addition to @jeremymeng's point, it was decided that, given that this is a super niche use case, doing a simpler thing is acceptable.
| * @memberof DirectoryClient | ||
| */ | ||
| public async forceCloseAllHandles( | ||
| options: DirectoryForceCloseHandlesSegmentOptions = {} |
There was a problem hiding this comment.
We also want a boolean recursive parameter. Is it supported by DirectoryForceCloseHandlesSegmentOptions or do we have to navigate the directory structure by ourselves?
There was a problem hiding this comment.
recursive parameter is present in DirectoryForceCloseHandlesSegmentOptions.
|
Fixes #5544 |
This is almost same as @JoshLove-msft's equivalent PR Azure/azure-sdk-for-net#8134 in .NET