{"action":"created","issue":{"url":"https://api.github.com/repos/minio/minio-go/issues/495","repository_url":"https://api.github.com/repos/minio/minio-go","labels_url":"https://api.github.com/repos/minio/minio-go/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/minio/minio-go/issues/495/comments","events_url":"https://api.github.com/repos/minio/minio-go/issues/495/events","html_url":"https://github.com/minio/minio-go/pull/495","id":173109402,"number":495,"title":"GetObject: allow reading only a limited range of a file","user":{"login":"awwalker","id":11507633,"avatar_url":"https://avatars.githubusercontent.com/u/11507633?v=3","gravatar_id":"","url":"https://api.github.com/users/awwalker","html_url":"https://github.com/awwalker","followers_url":"https://api.github.com/users/awwalker/followers","following_url":"https://api.github.com/users/awwalker/following{/other_user}","gists_url":"https://api.github.com/users/awwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/awwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awwalker/subscriptions","organizations_url":"https://api.github.com/users/awwalker/orgs","repos_url":"https://api.github.com/users/awwalker/repos","events_url":"https://api.github.com/users/awwalker/events{/privacy}","received_events_url":"https://api.github.com/users/awwalker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-25T04:00:38Z","updated_at":"2016-08-27T19:29:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minio/minio-go/pulls/495","html_url":"https://github.com/minio/minio-go/pull/495","diff_url":"https://github.com/minio/minio-go/pull/495.diff","patch_url":"https://github.com/minio/minio-go/pull/495.patch"},"body":"Fixes: #484 \r\n\r\nThis removes a test in api_unit_test.go because newObject no longer functions by taking in ObjectInfo as a parameter. \r\n\r\nRunning $ go test -v ./... runs into #464 but testing all individual GetObject tests and PutObject tests runs just fine."},"comment":{"url":"https://api.github.com/repos/minio/minio-go/issues/comments/242936126","html_url":"https://github.com/minio/minio-go/pull/495#issuecomment-242936126","issue_url":"https://api.github.com/repos/minio/minio-go/issues/495","id":242936126,"user":{"login":"awwalker","id":11507633,"avatar_url":"https://avatars.githubusercontent.com/u/11507633?v=3","gravatar_id":"","url":"https://api.github.com/users/awwalker","html_url":"https://github.com/awwalker","followers_url":"https://api.github.com/users/awwalker/followers","following_url":"https://api.github.com/users/awwalker/following{/other_user}","gists_url":"https://api.github.com/users/awwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/awwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awwalker/subscriptions","organizations_url":"https://api.github.com/users/awwalker/orgs","repos_url":"https://api.github.com/users/awwalker/repos","events_url":"https://api.github.com/users/awwalker/events{/privacy}","received_events_url":"https://api.github.com/users/awwalker/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T19:29:41Z","updated_at":"2016-08-27T19:29:41Z","body":"@fd0 thanks for taking a look! \r\n\r\nI think I have a simpler solution than making readAt a standalone function. I'll let getObject know whether or not this is a readAt request or standard read and use the (offset, offset+len(buf)) range for  readAt requests. I think this will solve your issue and let the underlying code stay the same. \r\n\r\nDoes that sound good?\r\n\r\nOnce this change is in place there will be a downside in that for a smaller buffer the request could be aggressively long. Where each request for a separate range would initiate a new Get() when one full read would be better. To the server this could look like random i/o if they are initiate in parallel. \r\n\r\nKeeping a local cache and operating on that would be better. ReadAt() is good on a file system but on a network it is not ideal. "}}
{"actor":{"display_login":"awwalker"}}