{"action":"opened","issue":{"url":"https://api.github.com/repos/belaban/IspnPerfTest/issues/14","repository_url":"https://api.github.com/repos/belaban/IspnPerfTest","labels_url":"https://api.github.com/repos/belaban/IspnPerfTest/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/belaban/IspnPerfTest/issues/14/comments","events_url":"https://api.github.com/repos/belaban/IspnPerfTest/issues/14/events","html_url":"https://github.com/belaban/IspnPerfTest/issues/14","id":193136609,"number":14,"title":"Validate consistency","user":{"login":"belaban","id":457949,"avatar_url":"https://avatars.githubusercontent.com/u/457949?v=3","gravatar_id":"","url":"https://api.github.com/users/belaban","html_url":"https://github.com/belaban","followers_url":"https://api.github.com/users/belaban/followers","following_url":"https://api.github.com/users/belaban/following{/other_user}","gists_url":"https://api.github.com/users/belaban/gists{/gist_id}","starred_url":"https://api.github.com/users/belaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/belaban/subscriptions","organizations_url":"https://api.github.com/users/belaban/orgs","repos_url":"https://api.github.com/users/belaban/repos","events_url":"https://api.github.com/users/belaban/events{/privacy}","received_events_url":"https://api.github.com/users/belaban/received_events","type":"User","site_admin":false},"labels":[{"id":21054499,"url":"https://api.github.com/repos/belaban/IspnPerfTest/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-02T15:01:39Z","updated_at":"2016-12-02T15:01:39Z","closed_at":null,"body":"This should be an additional phase, to be invoked e.g. after a test run. It should spit out inconsistencies for all keys that are found to be inconsistent.\r\nTo do this, we need to (1) add a unique marker to all values and (2) have a method that returns all _local_ keys and values for a given node.\r\n\r\nWhen validation mode is on, each byte[] array that's value of a `put(key,value)` operation has to have a unique marker. This can be done by generating a random 16 byte value and putting it into the first 16 bytes of a byte[] array value.\r\n\r\nThe validation phase works as follows:\r\n* Say we have nodes {A,B,C,D} and we're on node A\r\n* Create a hashmap of keys and _tuples of values_\r\n    * Each tuple has numOwner values (currently fixed at 2)\r\n    * The values are not the full byte arrays, but only the first 16 bytes (this saves memory)\r\n* Insert the _local_ keys and values, in this case A. This is done using the above mentioned method to retrieve all local keys and values\r\n* For all nodes in set {B,C,D}:\r\n   * Get the local keys and values (note that we only need to send the first 16 bytes!)\r\n   * For each key K and value V:\r\n      * If K doesn't exist, add it and the value the the hashmap\r\n      * If K exists: if the tuple has a key that matches the value -> remove the key and value\r\n      * Else write the inconsistency to a failure hashmap -> print it at the end of the validation run\r\n\r\nThis ensures that we're transmitting as minimal data as possible across the wire and prevents out-of-memory exceptions."}}
{"actor":{"display_login":"belaban"}}