{"action":"created","issue":{"url":"https://api.github.com/repos/boltdb/bolt/issues/411","labels_url":"https://api.github.com/repos/boltdb/bolt/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/boltdb/bolt/issues/411/comments","events_url":"https://api.github.com/repos/boltdb/bolt/issues/411/events","html_url":"https://github.com/boltdb/bolt/pull/411","id":102469110,"number":411,"title":"solaris: fix issues with mmap, munmap, madvise and flock","user":{"login":"ksedgwic","id":38590,"avatar_url":"https://avatars.githubusercontent.com/u/38590?v=3","gravatar_id":"","url":"https://api.github.com/users/ksedgwic","html_url":"https://github.com/ksedgwic","followers_url":"https://api.github.com/users/ksedgwic/followers","following_url":"https://api.github.com/users/ksedgwic/following{/other_user}","gists_url":"https://api.github.com/users/ksedgwic/gists{/gist_id}","starred_url":"https://api.github.com/users/ksedgwic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksedgwic/subscriptions","organizations_url":"https://api.github.com/users/ksedgwic/orgs","repos_url":"https://api.github.com/users/ksedgwic/repos","events_url":"https://api.github.com/users/ksedgwic/events{/privacy}","received_events_url":"https://api.github.com/users/ksedgwic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-21T21:52:07Z","updated_at":"2015-08-25T01:23:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/boltdb/bolt/pulls/411","html_url":"https://github.com/boltdb/bolt/pull/411","diff_url":"https://github.com/boltdb/bolt/pull/411.diff","patch_url":"https://github.com/boltdb/bolt/pull/411.patch"},"body":"* Many thanks to @akolb1 for the FcntlFlock based flock implementation.\r\n\r\n* Requires recent golang.org/x/sys/unix for fixed mmap,munmap,madvise.\r\n\r\n* Fixes #274 and fixes #305.\r\n\r\n* Addresses part of #345.\r\n\r\n* Solaris fcntl locks don't support intra-process locking\r\n\r\nThree unit tests were failing, now are skipped on solaris only:\r\n\r\n```\r\nseed: 68195\r\nquick settings: count=5, items=1000, ksize=1024, vsize=1024\r\n00010000000000000000000000000000\r\ndb_test.go:57: \r\n\r\n--- FAIL: TestOpen_Timeout (0.00s)\r\ndb_test.go:86: \r\n\r\n--- FAIL: TestOpen_Wait (0.00s)\r\ndb_test.go:257: \r\n\r\n--- FAIL: TestOpen_ReadOnly (0.00s)\r\nFAIL\r\nexit status 1\r\nFAIL    github.com/boltdb/bolt  354.617s\r\n```\r\n\r\n* FcntlFlock treats separate locks on separate file descriptors differently then Flock.\r\n\r\n* Flock semantics are preferrable for multithreaded servers.\r\n\r\n* No simple replacement currently available on Solaris.\r\n\r\nReferences:\r\n\r\n* http://infinitesque.net/articles/2010/on%20Python%20flock/\r\n\r\n* https://github.com/jperkin/www.perkin.org.uk/blob/master/_posts/2013-01-08-solaris-portability-flock.markdown\r\n\r\n* https://gist.github.com/MerlinDMC/3197f4d13f8145c457e4\r\n"},"comment":{"url":"https://api.github.com/repos/boltdb/bolt/issues/comments/134436946","html_url":"https://github.com/boltdb/bolt/pull/411#issuecomment-134436946","issue_url":"https://api.github.com/repos/boltdb/bolt/issues/411","id":134436946,"user":{"login":"benbjohnson","id":118015,"avatar_url":"https://avatars.githubusercontent.com/u/118015?v=3","gravatar_id":"","url":"https://api.github.com/users/benbjohnson","html_url":"https://github.com/benbjohnson","followers_url":"https://api.github.com/users/benbjohnson/followers","following_url":"https://api.github.com/users/benbjohnson/following{/other_user}","gists_url":"https://api.github.com/users/benbjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/benbjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbjohnson/subscriptions","organizations_url":"https://api.github.com/users/benbjohnson/orgs","repos_url":"https://api.github.com/users/benbjohnson/repos","events_url":"https://api.github.com/users/benbjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/benbjohnson/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T01:23:37Z","updated_at":"2015-08-25T01:23:37Z","body":"@ksedgwic touché. :) merging!"}}