{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/3522","repository_url":"https://api.github.com/repos/syncthing/syncthing","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/3522/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/3522/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/3522/events","html_url":"https://github.com/syncthing/syncthing/pull/3522","id":171776335,"number":3522,"title":"lib/model: Introducer can remove stuff it introduced (fixes #1015)","user":{"login":"AudriusButkevicius","id":1144861,"avatar_url":"https://avatars.githubusercontent.com/u/1144861?v=3","gravatar_id":"","url":"https://api.github.com/users/AudriusButkevicius","html_url":"https://github.com/AudriusButkevicius","followers_url":"https://api.github.com/users/AudriusButkevicius/followers","following_url":"https://api.github.com/users/AudriusButkevicius/following{/other_user}","gists_url":"https://api.github.com/users/AudriusButkevicius/gists{/gist_id}","starred_url":"https://api.github.com/users/AudriusButkevicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AudriusButkevicius/subscriptions","organizations_url":"https://api.github.com/users/AudriusButkevicius/orgs","repos_url":"https://api.github.com/users/AudriusButkevicius/repos","events_url":"https://api.github.com/users/AudriusButkevicius/events{/privacy}","received_events_url":"https://api.github.com/users/AudriusButkevicius/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-08-17T22:30:37Z","updated_at":"2016-11-08T22:02:56Z","closed_at":"2016-11-07T16:40:48Z","pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing/pulls/3522","html_url":"https://github.com/syncthing/syncthing/pull/3522","diff_url":"https://github.com/syncthing/syncthing/pull/3522.diff","patch_url":"https://github.com/syncthing/syncthing/pull/3522.patch"},"body":"### Purpose\n\nAs per subject. Most wanted feature number 5.\nNo config migration required as existing introductions will be empty for now, so they won't be removed.\n### Testing\n\nUnit tests\n### Documentation\n- [ ] Explain how this works in the introducer section\n- [ ] Document the new attributes on the FolderConfig bla bla structs, as well as the protocol.\n- [ ] Make a note in the release notes explaining that the functionality has changed.\n"},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/259273712","html_url":"https://github.com/syncthing/syncthing/pull/3522#issuecomment-259273712","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/3522","id":259273712,"user":{"login":"AudriusButkevicius","id":1144861,"avatar_url":"https://avatars.githubusercontent.com/u/1144861?v=3","gravatar_id":"","url":"https://api.github.com/users/AudriusButkevicius","html_url":"https://github.com/AudriusButkevicius","followers_url":"https://api.github.com/users/AudriusButkevicius/followers","following_url":"https://api.github.com/users/AudriusButkevicius/following{/other_user}","gists_url":"https://api.github.com/users/AudriusButkevicius/gists{/gist_id}","starred_url":"https://api.github.com/users/AudriusButkevicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AudriusButkevicius/subscriptions","organizations_url":"https://api.github.com/users/AudriusButkevicius/orgs","repos_url":"https://api.github.com/users/AudriusButkevicius/repos","events_url":"https://api.github.com/users/AudriusButkevicius/events{/privacy}","received_events_url":"https://api.github.com/users/AudriusButkevicius/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T22:02:56Z","updated_at":"2016-11-08T22:02:56Z","body":"So perhaps I am too tired, but I am not sure I understand the race.\r\nIt seems that the race is between me setting some config bits and the config itself handling the fact that something has changed? Is that not a deficiency of the config or am I misusing it?\r\n\r\n\r\nSaving this here in case the build rolls off.\r\n```\r\n03:34:44 ==================\r\n03:34:44 WARNING: DATA RACE\r\n03:34:44 Write at 0x00c4217dcfd0 by goroutine 81:\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*FolderConfiguration).prepare()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/folderconfiguration.go:127 +0x94\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Configuration).clean()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/config.go:223 +0x26a\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).replaceLocked()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:139 +0x101\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).Replace()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:133 +0x122\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).handleDeintroductions()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:993 +0x1402\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:882 +0x1f6b\r\n03:34:44   github.com/syncthing/syncthing/lib/model.TestIntroducer()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model_test.go:646 +0x1a4f\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44 \r\n03:34:44 Previous read at 0x00c4217dcfd0 by goroutine 37:\r\n03:34:44   github.com/syncthing/syncthing/lib/model.mapFolders()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:2405 +0xd4\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).CommitConfiguration()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:2333 +0xc7\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).notifyListener()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:168 +0x23a\r\n03:34:44 \r\n03:34:44 Goroutine 81 (running) created at:\r\n03:34:44   testing.(*T).Run()\r\n03:34:44       /usr/local/go/src/testing/testing.go:646 +0x52f\r\n03:34:44   testing.RunTests.func1()\r\n03:34:44       /usr/local/go/src/testing/testing.go:793 +0xb9\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44   testing.RunTests()\r\n03:34:44       /usr/local/go/src/testing/testing.go:799 +0x4ba\r\n03:34:44   testing.(*M).Run()\r\n03:34:44       /usr/local/go/src/testing/testing.go:743 +0x12f\r\n03:34:44   main.main()\r\n03:34:44       github.com/syncthing/syncthing/lib/model/_test/_testmain.go:154 +0x1b8\r\n03:34:44 \r\n03:34:44 Goroutine 37 (running) created at:\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).notifyListeners()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:162 +0x13d\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).replaceLocked()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:155 +0x5ad\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).SetFolder()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:243 +0x2a2\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).handleDeintroductions()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:966 +0x1651\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:882 +0x1f6b\r\n03:34:44   github.com/syncthing/syncthing/lib/model.TestIntroducer()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model_test.go:646 +0x1a4f\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44 ==================\r\n03:34:44 03:34:33 INFO: Restarted folder folder2 (readwrite)\r\n03:34:44 ==================\r\n03:34:44 WARNING: DATA RACE\r\n03:34:44 Write at 0x00c4217dcf38 by goroutine 81:\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Configuration).clean()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/config.go:272 +0x9ff\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).replaceLocked()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:139 +0x101\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).Replace()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:133 +0x122\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).handleDeintroductions()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:993 +0x1402\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:882 +0x1f6b\r\n03:34:44   github.com/syncthing/syncthing/lib/model.TestIntroducer()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model_test.go:646 +0x1a4f\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44 \r\n03:34:44 Previous read at 0x00c4217dcf38 by goroutine 37:\r\n03:34:44   github.com/syncthing/syncthing/lib/model.mapFolders()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:2405 +0xd4\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).CommitConfiguration()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:2333 +0xc7\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).notifyListener()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:168 +0x23a\r\n03:34:44 \r\n03:34:44 Goroutine 81 (running) created at:\r\n03:34:44   testing.(*T).Run()\r\n03:34:44       /usr/local/go/src/testing/testing.go:646 +0x52f\r\n03:34:44   testing.RunTests.func1()\r\n03:34:44       /usr/local/go/src/testing/testing.go:793 +0xb9\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44   testing.RunTests()\r\n03:34:44       /usr/local/go/src/testing/testing.go:799 +0x4ba\r\n03:34:44   testing.(*M).Run()\r\n03:34:44       /usr/local/go/src/testing/testing.go:743 +0x12f\r\n03:34:44   main.main()\r\n03:34:44       github.com/syncthing/syncthing/lib/model/_test/_testmain.go:154 +0x1b8\r\n03:34:44 \r\n03:34:44 Goroutine 37 (running) created at:\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).notifyListeners()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:162 +0x13d\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).replaceLocked()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:155 +0x5ad\r\n03:34:44   github.com/syncthing/syncthing/lib/config.(*Wrapper).SetFolder()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/config/wrapper.go:243 +0x2a2\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).handleDeintroductions()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:966 +0x1651\r\n03:34:44   github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model.go:882 +0x1f6b\r\n03:34:44   github.com/syncthing/syncthing/lib/model.TestIntroducer()\r\n03:34:44       /home/buildslave/workspace/syncthing/src/github.com/syncthing/syncthing/lib/model/model_test.go:646 +0x1a4f\r\n03:34:44   testing.tRunner()\r\n03:34:44       /usr/local/go/src/testing/testing.go:610 +0xc9\r\n03:34:44 ==================\r\n```\r\n"}}
{"actor":{"display_login":"AudriusButkevicius"}}