{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/6285","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/6285/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/6285/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/6285/events","html_url":"https://github.com/neo4j/neo4j/pull/6285","id":128251430,"number":6285,"title":"Move auto-indexing implementation out of Core API.","user":{"login":"jakewins","id":182752,"avatar_url":"https://avatars.githubusercontent.com/u/182752?v=3","gravatar_id":"","url":"https://api.github.com/users/jakewins","html_url":"https://github.com/jakewins","followers_url":"https://api.github.com/users/jakewins/followers","following_url":"https://api.github.com/users/jakewins/following{/other_user}","gists_url":"https://api.github.com/users/jakewins/gists{/gist_id}","starred_url":"https://api.github.com/users/jakewins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakewins/subscriptions","organizations_url":"https://api.github.com/users/jakewins/orgs","repos_url":"https://api.github.com/users/jakewins/repos","events_url":"https://api.github.com/users/jakewins/events{/privacy}","received_events_url":"https://api.github.com/users/jakewins/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4j/neo4j/labels/3.0","name":"3.0","color":"006b75"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/kernel","name":"kernel","color":"0052cc"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/NOT%20READY%20FOR%20MERGE","name":"NOT READY FOR MERGE","color":"e11d21"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/remoting","name":"remoting","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-22T21:36:25Z","updated_at":"2016-01-22T21:37:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/6285","html_url":"https://github.com/neo4j/neo4j/pull/6285","diff_url":"https://github.com/neo4j/neo4j/pull/6285.diff","patch_url":"https://github.com/neo4j/neo4j/pull/6285.patch"},"body":"The purpose of this change is to make it possible to instantiate GraphDatabaseFacade\r\ninstances without also reconfiguring auto indexing(!). This, in turn, is part of work\r\nto provide a GDS implementation to Procedures that does not allow `shutdown` \r\nand a few other low-level methods.\r\n\r\nThis is yet another step towards decoupling the legacy kernel code from\r\nthe cleaner Kernel API. In the past, auto-indexing was handled\r\n(unsurprisingly) by the NodeManager god class. Auto indexing enabling\r\nwas done like:\r\n\r\n    Facade(enable tracking)\r\n    -> NodeManager.addTracker\r\n    -> (update list shared by reference to kernel)\r\n\r\nWhere the list of trackers was a generalized system for tracking properties,\r\nwhich has never been used other than to add and remove this single auto\r\nindex tracker. The NodeManager had nothing to do with auto indexing, other\r\nthan that it held onto some state related to it. Auto indexes were then\r\nupdated whenever there was a change through this chain:\r\n\r\n    Facade(set property)\r\n    -> Kernel(trigger tracker)\r\n    -> LegacyPropertyTrackers\r\n    -> Facade(on tracker trigger)\r\n    -> DataWriteOps(idx update)\r\n\r\nAnd finally, all this was configured as a side-effect of calling the GDF\r\nconstructor. This commit changes this, such that the Core API only acts\r\nas an API, it delegates all auto index operations to a special AutoIndexing\r\nservice. The reason for doing it like so, rather than adding kernel\r\nprimitives is that AutoIndex configuration is set entirely at runtime, is\r\nnot transactional and is not propagated in clusters - it's simply runtime\r\nstate.\r\n\r\nThe AutoIndexing service is now shared between the Core API and the Kernel,\r\nencapsulating the auto indexing logic. This means that enabling an auto\r\nindex now looks like:\r\n\r\n    Facade(enable tracking)\r\n    -> AutoIndexing#enabled\r\n\r\nAnd property changes are propagated directly from the kernel without going\r\nback up to the Core API:\r\n\r\n    Facade(set property)\r\n    -> Kernel\r\n    -> AutoIndexing#onChange\r\n    -> DataWriteOps(idx update)"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/174057961","html_url":"https://github.com/neo4j/neo4j/pull/6285#issuecomment-174057961","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/6285","id":174057961,"user":{"login":"jakewins","id":182752,"avatar_url":"https://avatars.githubusercontent.com/u/182752?v=3","gravatar_id":"","url":"https://api.github.com/users/jakewins","html_url":"https://github.com/jakewins","followers_url":"https://api.github.com/users/jakewins/followers","following_url":"https://api.github.com/users/jakewins/following{/other_user}","gists_url":"https://api.github.com/users/jakewins/gists{/gist_id}","starred_url":"https://api.github.com/users/jakewins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakewins/subscriptions","organizations_url":"https://api.github.com/users/jakewins/orgs","repos_url":"https://api.github.com/users/jakewins/repos","events_url":"https://api.github.com/users/jakewins/events{/privacy}","received_events_url":"https://api.github.com/users/jakewins/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T21:37:42Z","updated_at":"2016-01-22T21:37:42Z","body":"Marked as NOT_READY pending kernel team review"}}