)]}'
{"rally/plugins/openstack/scenarios/swift/objects.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"e803059a0540690781d25a0599e6e91d246cce16","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                for i in range(objects_per_container):"},{"line_number":51,"context_line":"                    dummy_file.seek(0)"},{"line_number":52,"context_line":"                    self._upload_object(container_name, dummy_file,"},{"line_number":53,"context_line":"                                        content_length\u003dobject_size,"},{"line_number":54,"context_line":"                                        atomic_action\u003dFalse)"},{"line_number":55,"context_line":"        self._list_objects(container_name)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_9c120156","line":53,"updated":"2016-03-09 10:44:55.000000000","message":"This is not the exact size of the object http://paste.openstack.org/show/489808/ as I undestand. If the size of temp object less then \u0027object_size\u0027 before truncate then \u0027object_size\u0027 is not the size of the object.","commit_id":"e9e518f511cef208f7ee003675b50baf70155139"},{"author":{"_account_id":8935,"name":"Andrey Danin","email":"gcon.monolake@gmail.com","username":"adanin"},"change_message_id":"15882a8e8eb14b954c0c497ed228c646c8463942","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                for i in range(objects_per_container):"},{"line_number":51,"context_line":"                    dummy_file.seek(0)"},{"line_number":52,"context_line":"                    self._upload_object(container_name, dummy_file,"},{"line_number":53,"context_line":"                                        content_length\u003dobject_size,"},{"line_number":54,"context_line":"                                        atomic_action\u003dFalse)"},{"line_number":55,"context_line":"        self._list_objects(container_name)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_d35c537f","line":53,"in_reply_to":"5aef4532_9c120156","updated":"2016-03-09 19:04:53.000000000","message":"Roman,\nYour example is not quite correct in this case. getsizeof() returns size of an object in memory which represents a file, not file size itself. Correct approach is to use os.fstat() as it\u0027s described in http://stackoverflow.com/questions/283707/size-of-an-open-file-object\n\nSpeaking of fileObject.truncate() - the way it\u0027s used here works on Linux but may not work on other platforms. A quote from http://www.tutorialspoint.com/python/file_truncate.htm:\n\"Note that if a specified size exceeds the file\u0027s current size, the result is platform-dependent.\"","commit_id":"e9e518f511cef208f7ee003675b50baf70155139"}]}
