{"action":"created","issue":{"url":"https://api.github.com/repos/terzerm/hover-raft/issues/5","repository_url":"https://api.github.com/repos/terzerm/hover-raft","labels_url":"https://api.github.com/repos/terzerm/hover-raft/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/terzerm/hover-raft/issues/5/comments","events_url":"https://api.github.com/repos/terzerm/hover-raft/issues/5/events","html_url":"https://github.com/terzerm/hover-raft/pull/5","id":191853394,"number":5,"title":"Simplifications around command log","user":{"login":"terzerm","id":10127131,"avatar_url":"https://avatars.githubusercontent.com/u/10127131?v=3","gravatar_id":"","url":"https://api.github.com/users/terzerm","html_url":"https://github.com/terzerm","followers_url":"https://api.github.com/users/terzerm/followers","following_url":"https://api.github.com/users/terzerm/following{/other_user}","gists_url":"https://api.github.com/users/terzerm/gists{/gist_id}","starred_url":"https://api.github.com/users/terzerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terzerm/subscriptions","organizations_url":"https://api.github.com/users/terzerm/orgs","repos_url":"https://api.github.com/users/terzerm/repos","events_url":"https://api.github.com/users/terzerm/events{/privacy}","received_events_url":"https://api.github.com/users/terzerm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-27T10:12:23Z","updated_at":"2016-11-28T13:22:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/terzerm/hover-raft/pulls/5","html_url":"https://github.com/terzerm/hover-raft/pull/5","diff_url":"https://github.com/terzerm/hover-raft/pull/5.diff","patch_url":"https://github.com/terzerm/hover-raft/pull/5.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/terzerm/hover-raft/issues/comments/263269819","html_url":"https://github.com/terzerm/hover-raft/pull/5#issuecomment-263269819","issue_url":"https://api.github.com/repos/terzerm/hover-raft/issues/5","id":263269819,"user":{"login":"terzerm","id":10127131,"avatar_url":"https://avatars.githubusercontent.com/u/10127131?v=3","gravatar_id":"","url":"https://api.github.com/users/terzerm","html_url":"https://github.com/terzerm","followers_url":"https://api.github.com/users/terzerm/followers","following_url":"https://api.github.com/users/terzerm/following{/other_user}","gists_url":"https://api.github.com/users/terzerm/gists{/gist_id}","starred_url":"https://api.github.com/users/terzerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terzerm/subscriptions","organizations_url":"https://api.github.com/users/terzerm/orgs","repos_url":"https://api.github.com/users/terzerm/repos","events_url":"https://api.github.com/users/terzerm/events{/privacy}","received_events_url":"https://api.github.com/users/terzerm/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T13:22:42Z","updated_at":"2016-11-28T13:22:42Z","body":"donnow. don’t like this redundancy stuff. it confused me completely.\n\n\n\n> On 28 Nov 2016, at 11:57 PM, Anton Anufriev <notifications@github.com> wrote:\n> \n> @anton-anufriev commented on this pull request.\n> \n> In src/main/java/org/tools4j/hoverraft/command/InMemoryCommandLog.java <https://github.com/terzerm/hover-raft/pull/5#pullrequestreview-10309860>:\n> \n> >      }\n>  \n>      @Override\n> -    public synchronized void append(final LogEntry logEntry) {\n> -        entries.add(clone(logEntry));\n> +    public void append(final int term, final Command command) {\n> +        final LogEntry logEntry = directFactory.logEntry();\n> +        logEntry.logKey().term(term);\n> +        logEntry.command()\n> +                .writeBufferOrNull()\n> +                .putBytes(0, command.readBufferOrNull(), command.offset(), command.byteLength());\n> +        synchronized (this) {\n> +            final long index = entries.size();\n> +            logEntry.logKey().index(index);//TODO this is redundant, do we need this?\n> I would leave it for now. I thought it was nice to pass prevLogKey to appendRequest and lastLogKey in the voteRequest and apply compare and containment operation on them. But may be it is redundant.\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub <https://github.com/terzerm/hover-raft/pull/5#pullrequestreview-10309860>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJqHGyK2t31J0F1XpBD6f_fR3hyqnfWxks5rCs_JgaJpZM4K9HFS>.\n> \n\n"}}
{"actor":{"display_login":"terzerm"}}