You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Infinite request loop in listObjects() if last item returned is directory #217
After testing, the issue might be unrelated to delimiters.
When making requests to list objects in containers, there are at least two requests :
The first one is a simple get (with additional parameters if present)
The second one take the last returned item's name and set it as a marker, to make sure all items were returned. The requests stop if the response is either a 204 response code or the body is empty.
If for some reason, the last item does not have the name attribute (I.E, it's a directory)
(Might happen only with directories created with the Swift web interface), the marker is empty, and thus the same request is sent over and over again (since the response is never empty).
changed the title [-]Infinite request loop in listObjects() with delimiter =' /' and no prefix (or empty)[/-][+]Infinite request loop in listObjects() if last item returned is directory[/+]on Feb 23, 2018
The issue was actually fixed by #214 , I still had 3.0.3 locally. It works perfectly now.
Issue actually stems from Horizon with the Swift dashboard : when asked to create a folder, instead of creating a normal object, it create a "folder" object, without the "name" key.
Folder item : {'subdir': 'test/'} instead of {'name': 'test/'}
I'm guessing that the marker sent to the API is the "name" of the last item, thus the issue occurring when a folder is the last one listed.
While the issue is already fixed, it might be interesting to check if a new marker was actually set before re-sending the request, to avoid infinite loops.
Activity
[-]Infinite request loop in listObjects() with delimiter =' /' and no prefix (or empty)[/-][+]Infinite request loop in listObjects() if last item returned is directory[/+]haphan commentedon Feb 25, 2018
@mboudet Did you encounter the issue before #214 merged?
Appreciate if you can provide minimum re-producible code.
mboudet commentedon Feb 25, 2018
The issue was actually fixed by #214 , I still had 3.0.3 locally. It works perfectly now.
Issue actually stems from Horizon with the Swift dashboard : when asked to create a folder, instead of creating a normal object, it create a "folder" object, without the "name" key.
Folder item : {'subdir': 'test/'} instead of {'name': 'test/'}
I'm guessing that the marker sent to the API is the "name" of the last item, thus the issue occurring when a folder is the last one listed.
While the issue is already fixed, it might be interesting to check if a new marker was actually set before re-sending the request, to avoid infinite loops.
haphan commentedon Feb 26, 2018
Great to hear that. I am going to release 3.0.4 now.