{"action":"created","issue":{"url":"https://api.github.com/repos/infinispan/infinispan/issues/3912","repository_url":"https://api.github.com/repos/infinispan/infinispan","labels_url":"https://api.github.com/repos/infinispan/infinispan/issues/3912/labels{/name}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/3912/comments","events_url":"https://api.github.com/repos/infinispan/infinispan/issues/3912/events","html_url":"https://github.com/infinispan/infinispan/pull/3912","id":123829464,"number":3912,"title":"ISPN-5413 Index Affinity support","user":{"login":"gustavonalle","id":440989,"avatar_url":"https://avatars.githubusercontent.com/u/440989?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavonalle","html_url":"https://github.com/gustavonalle","followers_url":"https://api.github.com/users/gustavonalle/followers","following_url":"https://api.github.com/users/gustavonalle/following{/other_user}","gists_url":"https://api.github.com/users/gustavonalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavonalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavonalle/subscriptions","organizations_url":"https://api.github.com/users/gustavonalle/orgs","repos_url":"https://api.github.com/users/gustavonalle/repos","events_url":"https://api.github.com/users/gustavonalle/events{/privacy}","received_events_url":"https://api.github.com/users/gustavonalle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/infinispan/infinispan/labels/Needs%20Rebase","name":"Needs Rebase","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-24T19:23:24Z","updated_at":"2016-02-17T09:26:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/3912","html_url":"https://github.com/infinispan/infinispan/pull/3912","diff_url":"https://github.com/infinispan/infinispan/pull/3912.diff","patch_url":"https://github.com/infinispan/infinispan/pull/3912.patch"},"body":"https://issues.jboss.org/browse/ISPN-5413\r\n\r\nRequires Hibernate Search master\r\n\r\n##### Overview #####\r\nThis PR introduces a new IndexManager: ```org.infinispan.query.affinity.ShardIndexManager``` that implements the index affinity as described on https://github.com/infinispan/infinispan/wiki/Index-affinity-proposal. This index manager does not have a single master, it creates 1 shard per Infinispan segment, so each node indexes owned data locally.\r\n\r\n##### Usage #####\r\nCurrently, at a minimum it's necessary to specify the index manager name in the configuration plus the custom key partitioner in the cache. Ex:\r\n\r\n```\r\nConfigurationBuilder cfg = ...\r\ncfg.clustering().hash().keyPartitioner(new AffinityPartitioner());\r\ncfg.indexing().index(Index.ALL).addProperty(\"<my-index>.indexmanager\", ShardIndexManager.class.getName())\r\n```\r\n\r\n##### Integration #####\r\n\r\nIt should blend well with other query aspects: Mass Indexer, sync/async backend, multiple entities per cache, manual indexing, flags, etc.\r\n\r\n##### TODO  #####\r\n\r\n* ~~Automatic usage of SyncConsistentHash so that index caches and data caches agree on ownership~~\r\n* The configurable ratio segments/shard is not implemented yet.\r\n* Could use a bit more tests to have the same coverage of the InfinispanIndexManager.\r\n* Perf. tests\r\n"},"comment":{"url":"https://api.github.com/repos/infinispan/infinispan/issues/comments/185113742","html_url":"https://github.com/infinispan/infinispan/pull/3912#issuecomment-185113742","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/3912","id":185113742,"user":{"login":"tristantarrant","id":392478,"avatar_url":"https://avatars.githubusercontent.com/u/392478?v=3","gravatar_id":"","url":"https://api.github.com/users/tristantarrant","html_url":"https://github.com/tristantarrant","followers_url":"https://api.github.com/users/tristantarrant/followers","following_url":"https://api.github.com/users/tristantarrant/following{/other_user}","gists_url":"https://api.github.com/users/tristantarrant/gists{/gist_id}","starred_url":"https://api.github.com/users/tristantarrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristantarrant/subscriptions","organizations_url":"https://api.github.com/users/tristantarrant/orgs","repos_url":"https://api.github.com/users/tristantarrant/repos","events_url":"https://api.github.com/users/tristantarrant/events{/privacy}","received_events_url":"https://api.github.com/users/tristantarrant/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T09:26:51Z","updated_at":"2016-02-17T09:26:51Z","body":"@gustavonalle you did not push the rebased code :)"}}