[jira] [Assigned] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mukul Kumar Singh reassigned RATIS-295: --- Assignee: Shashikant Banerjee (was: Mukul Kumar Singh) > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.001.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583845#comment-16583845 ] Shashikant Banerjee commented on RATIS-295: --- Thanks [~msingh] for reporting and initiating work on this and [~szetszwo], for the review comments. Patch v2 addresses your review comments. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.001.patch, RATIS-295.02.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shashikant Banerjee updated RATIS-295: -- Attachment: RATIS-295.02.patch > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.001.patch, RATIS-295.02.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (RATIS-301) provide a force option to reinitialize group from a client in a different group
Mukul Kumar Singh created RATIS-301: --- Summary: provide a force option to reinitialize group from a client in a different group Key: RATIS-301 URL: https://issues.apache.org/jira/browse/RATIS-301 Project: Ratis Issue Type: Bug Components: server Affects Versions: 0.3.0 Reporter: Mukul Kumar Singh Assignee: Mukul Kumar Singh Fix For: 0.3.0 Currently for a client to re-initialize a raft group, it should be in the same group as the server's current group. This jira proposes to add a force option to override this requirement. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583968#comment-16583968 ] Hadoop QA commented on RATIS-295: - | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 15s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 1s{color} | {color:blue} Findbugs executables are not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 55s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 18s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 18s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 34s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 11s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 14s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 14s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 15s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 1s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 31s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red} 48m 1s{color} | {color:red} root in the patch failed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 6s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 55m 48s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | ratis.statemachine.TestStateMachine | | | ratis.server.simulation.TestRaftExceptionWithSimulation | | | ratis.server.simulation.TestRaftReconfigurationWithSimulatedRpc | | | ratis.server.simulation.TestLeaderElectionWithSimulatedRpc | | | ratis.server.simulation.TestServerInformationWithSimulatedRpc | | | ratis.TestRaftServerSlownessDetection | | | ratis.server.simulation.TestReinitializationWithSimulatedRpc | | | ratis.TestRaftServerLeaderElectionTimeout | | | ratis.server.simulation.TestRetryCacheWithSimulatedRpc | | | ratis.server.simulation.TestRaftSnapshotWithSimulatedRpc | | | ratis.server.impl.TestRaftServerJmx | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-08-17 | | JIRA Issue | RATIS-295 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12935355/RATIS-295.001.patch | | Optional Tests | asflicense javac javadoc unit findbugs checkstyle compile | | uname | Linux 4a12bfded769 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-RATIS-Build/yetus-personality.sh | | git revision | master / 0b73e89 | | Default Java | 1.8.0_171 | | unit | https://builds.apache.org/job/PreCommit-RATIS-Build/300/artifact/out/patch-unit-root.txt | | Test Results | https://builds.apache.org/job/PreCommit-RATIS-Build/300/testReport/ | | modules | C: ratis-server U: ratis-server | | Console output | https://builds.apache.org/job/PreCommit-RATIS-Build/300/console | | Powered by | Apache Yetus 0.5.0 http://yetus.apache.org | This message was automatically generated. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > -
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16583993#comment-16583993 ] Mukul Kumar Singh commented on RATIS-295: - Thanks for working on this [~shashikant]. There are multiple unit test failures. {code} [ERROR] testNotLeaderExceptionWithReconf(org.apache.ratis.server.simulation.TestRaftExceptionWithSimulation) Time elapsed: 10.895 s <<< FAILURE! java.lang.AssertionError: Unexpected exited. Caused by: org.apache.ratis.util.ExitUtils$ExitException: s1-RaftLogWorker failed. Caused by: java.lang.NullPointerException [ERROR] testStaleReadException(org.apache.ratis.server.simulation.TestRaftExceptionWithSimulation) Time elapsed: 5.489 s <<< FAILURE! java.lang.AssertionError: Unexpected exited. Caused by: org.apache.ratis.util.ExitUtils$ExitException: s1-RaftLogWorker failed. Caused by: java.lang.NullPointerException {code} > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.001.patch, RATIS-295.02.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mukul Kumar Singh updated RATIS-295: Attachment: (was: RATIS-295.001.patch) > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.02.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shashikant Banerjee updated RATIS-295: -- Attachment: (was: RATIS-295.02.patch) > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shashikant Banerjee updated RATIS-295: -- Attachment: RATIS-295.03.patch > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.03.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584033#comment-16584033 ] Shashikant Banerjee commented on RATIS-295: --- Removed the earlier patch and added patch v3 which addresses the test failures. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.03.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-301) provide a force option to reinitialize group from a client in a different group
[ https://issues.apache.org/jira/browse/RATIS-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mukul Kumar Singh updated RATIS-301: Attachment: RATIS-301.001.patch > provide a force option to reinitialize group from a client in a different > group > --- > > Key: RATIS-301 > URL: https://issues.apache.org/jira/browse/RATIS-301 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Mukul Kumar Singh >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-301.001.patch > > > Currently for a client to re-initialize a raft group, it should be in the > same group as the server's current group. This jira proposes to add a force > option to override this requirement. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584070#comment-16584070 ] Hadoop QA commented on RATIS-295: - | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 11s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 0s{color} | {color:blue} Findbugs executables are not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 23s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 1s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 16s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 31s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 15s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 30s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red} 8m 54s{color} | {color:red} root in the patch failed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 6s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 15m 24s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | ratis.TestRaftServerSlownessDetection | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-08-17 | | JIRA Issue | RATIS-295 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12936042/RATIS-295.03.patch | | Optional Tests | asflicense javac javadoc unit findbugs checkstyle compile | | uname | Linux 84a60a92b50c 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-RATIS-Build/yetus-personality.sh | | git revision | master / 0b73e89 | | Default Java | 1.8.0_171 | | unit | https://builds.apache.org/job/PreCommit-RATIS-Build/301/artifact/out/patch-unit-root.txt | | Test Results | https://builds.apache.org/job/PreCommit-RATIS-Build/301/testReport/ | | modules | C: ratis-server U: ratis-server | | Console output | https://builds.apache.org/job/PreCommit-RATIS-Build/301/console | | Powered by | Apache Yetus 0.5.0 http://yetus.apache.org | This message was automatically generated. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.03.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as
[jira] [Commented] (RATIS-301) provide a force option to reinitialize group from a client in a different group
[ https://issues.apache.org/jira/browse/RATIS-301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584090#comment-16584090 ] Hadoop QA commented on RATIS-301: - | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 11s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 1s{color} | {color:blue} Findbugs executables are not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 5s{color} | {color:blue} Maven dependency ordering for branch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 8s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 1s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 19s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 30s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 5s{color} | {color:blue} Maven dependency ordering for patch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 8s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} cc {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 1s{color} | {color:green} the patch passed {color} | | {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange} 0m 19s{color} | {color:orange} root: The patch generated 23 new + 391 unchanged - 4 fixed = 414 total (was 395) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 30s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red} 8m 37s{color} | {color:red} root in the patch failed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 6s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 15m 8s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | ratis.TestRaftServerSlownessDetection | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-08-17 | | JIRA Issue | RATIS-301 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12936043/RATIS-301.001.patch | | Optional Tests | asflicense javac javadoc unit findbugs checkstyle compile cc | | uname | Linux f8833b7273dc 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-RATIS-Build/yetus-personality.sh | | git revision | master / 0b73e89 | | Default Java | 1.8.0_171 | | checkstyle | https://builds.apache.org/job/PreCommit-RATIS-Build/302/artifact/out/diff-checkstyle-root.txt | | unit | https://builds.apache.org/job/PreCommit-RATIS-Build/302/artifact/out/patch-unit-root.txt | | Test Results | https://builds.apache.org/job/PreCommit-RATIS-Build/302/testReport/ | | modules | C: ratis-proto-shaded ratis-common ratis-client ratis-server U: . | | Console output | https://builds.apache.org/job/PreCommit-RATIS-Build/302/console | | Powered by | Apache Yetus 0.5.0 http://yetus.apache.org | This message was automatically generated. > provide a force option to reinitialize group from a client in a different > group >
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584200#comment-16584200 ] Tsz Wo Nicholas Sze commented on RATIS-295: --- Thanks [~shashikant] for picking this up. - We should call flushStateMachineData(..) before out.flush() and then get() after out.flush() so that two flush calls can run in parallel. {code} +final CompletableFuture f = stateMachine != null? +stateMachine.flushStateMachineData(lastWrittenIndex): CompletableFuture.completedFuture(null); out.flush(); +f.get(); {code} > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.03.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shashikant Banerjee updated RATIS-295: -- Attachment: RATIS-295.04.patch > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.03.patch, RATIS-295.04.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shashikant Banerjee updated RATIS-295: -- Attachment: (was: RATIS-295.03.patch) > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.04.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584208#comment-16584208 ] Shashikant Banerjee commented on RATIS-295: --- Thanks [~szetszwo], for the review comments. Patch v4 addresses the same. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.04.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584235#comment-16584235 ] Hadoop QA commented on RATIS-295: - | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 11s{color} | {color:blue} Docker mode activated. {color} | || || || || {color:brown} Prechecks {color} || | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 1s{color} | {color:blue} Findbugs executables are not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | | {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s{color} | {color:red} The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 19s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 11s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 18s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 36s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 22s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 11s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 11s{color} | {color:green} the patch passed {color} | | {color:orange}-0{color} | {color:orange} checkstyle {color} | {color:orange} 0m 16s{color} | {color:orange} root: The patch generated 3 new + 147 unchanged - 0 fixed = 150 total (was 147) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 32s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} unit {color} | {color:red} 8m 36s{color} | {color:red} root in the patch failed. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 6s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 15m 50s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | Failed junit tests | ratis.TestRaftServerLeaderElectionTimeout | \\ \\ || Subsystem || Report/Notes || | Docker | Client=17.05.0-ce Server=17.05.0-ce Image:yetus/ratis:date2018-08-17 | | JIRA Issue | RATIS-295 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12936051/RATIS-295.04.patch | | Optional Tests | asflicense javac javadoc unit findbugs checkstyle compile | | uname | Linux dc8b090866bd 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-RATIS-Build/yetus-personality.sh | | git revision | master / 0b73e89 | | Default Java | 1.8.0_181 | | checkstyle | https://builds.apache.org/job/PreCommit-RATIS-Build/303/artifact/out/diff-checkstyle-root.txt | | unit | https://builds.apache.org/job/PreCommit-RATIS-Build/303/artifact/out/patch-unit-root.txt | | Test Results | https://builds.apache.org/job/PreCommit-RATIS-Build/303/testReport/ | | modules | C: ratis-server U: ratis-server | | Console output | https://builds.apache.org/job/PreCommit-RATIS-Build/303/console | | Powered by | Apache Yetus 0.5.0 http://yetus.apache.org | This message was automatically generated. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > >
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584375#comment-16584375 ] Josh Elser commented on RATIS-272: -- {quote}can you update API doc? It is hard to discuss API using source files :) {quote} Heh, the first document was essentially java code, so I figured source would help. Let me try to distill what I wrote in code back to human readable and attach here. > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-295) RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584468#comment-16584468 ] Tsz Wo Nicholas Sze commented on RATIS-295: --- +1 the 04 patch looks good. > RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine > data is also written > > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.3.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.04.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-295) RaftLogWorker#flushWrites should also flush state machine data
[ https://issues.apache.org/jira/browse/RATIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tsz Wo Nicholas Sze updated RATIS-295: -- Affects Version/s: (was: 0.3.0) 0.2.0 Issue Type: Improvement (was: Bug) Summary: RaftLogWorker#flushWrites should also flush state machine data (was: RaftLogWorker#WriteLog#excute should updateFlushedIndex after state machine data is also written) > RaftLogWorker#flushWrites should also flush state machine data > -- > > Key: RATIS-295 > URL: https://issues.apache.org/jira/browse/RATIS-295 > Project: Ratis > Issue Type: Improvement > Components: server >Affects Versions: 0.2.0 >Reporter: Mukul Kumar Singh >Assignee: Shashikant Banerjee >Priority: Major > Labels: ozone > Fix For: 0.3.0 > > Attachments: RATIS-295.04.patch > > > Currently raft log worker only waits for the log data flush to finish. > However it should also wait for state machine data write to finish as well. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-253) Segmented Raft log rolls over segment frequently
[ https://issues.apache.org/jira/browse/RATIS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rajeshbabu Chintaguntla updated RATIS-253: -- Attachment: RATIS-253.patch > Segmented Raft log rolls over segment frequently > > > Key: RATIS-253 > URL: https://issues.apache.org/jira/browse/RATIS-253 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.2.0 >Reporter: Mukul Kumar Singh >Assignee: Rajeshbabu Chintaguntla >Priority: Major > Labels: ozone > Attachments: RATIS-253.patch > > > With statemachine implementation which abstract out the state machine data > from the append entries, frequent log rollovers can be observed. > Looking into the code, this seems to be because of 2 reasons. > a) LogSegment#append, updates the total size. However the size which needs to > be considered should not include the statemachine data. > b) Also SegmentRaftLog#isSegmentFull also considers the total proto object. > Here too, only the entry to be written to the log should be considered. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-253) Segmented Raft log rolls over segment frequently
[ https://issues.apache.org/jira/browse/RATIS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584542#comment-16584542 ] Rajeshbabu Chintaguntla commented on RATIS-253: --- [~msingh][~szetszwo] Here is the patch not including the statemachine data size while calculating entry size. > Segmented Raft log rolls over segment frequently > > > Key: RATIS-253 > URL: https://issues.apache.org/jira/browse/RATIS-253 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.2.0 >Reporter: Mukul Kumar Singh >Assignee: Rajeshbabu Chintaguntla >Priority: Major > Labels: ozone > Attachments: RATIS-253.patch > > > With statemachine implementation which abstract out the state machine data > from the append entries, frequent log rollovers can be observed. > Looking into the code, this seems to be because of 2 reasons. > a) LogSegment#append, updates the total size. However the size which needs to > be considered should not include the statemachine data. > b) Also SegmentRaftLog#isSegmentFull also considers the total proto object. > Here too, only the entry to be written to the log should be considered. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (RATIS-253) Segmented Raft log rolls over segment frequently
[ https://issues.apache.org/jira/browse/RATIS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584542#comment-16584542 ] Rajeshbabu Chintaguntla edited comment on RATIS-253 at 8/18/18 12:48 AM: - [~msingh][~szetszwo] Here is the patch not including the statemachine data size while calculating entry size. Please review. was (Author: rajeshbabu): [~msingh][~szetszwo] Here is the patch not including the statemachine data size while calculating entry size. > Segmented Raft log rolls over segment frequently > > > Key: RATIS-253 > URL: https://issues.apache.org/jira/browse/RATIS-253 > Project: Ratis > Issue Type: Bug > Components: server >Affects Versions: 0.2.0 >Reporter: Mukul Kumar Singh >Assignee: Rajeshbabu Chintaguntla >Priority: Major > Labels: ozone > Attachments: RATIS-253.patch > > > With statemachine implementation which abstract out the state machine data > from the append entries, frequent log rollovers can be observed. > Looking into the code, this seems to be because of 2 reasons. > a) LogSegment#append, updates the total size. However the size which needs to > be considered should not include the statemachine data. > b) Also SegmentRaftLog#isSegmentFull also considers the total proto object. > Here too, only the entry to be written to the log should be considered. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (RATIS-221) Support new operations in Arithmetic-Example (append, remove/delete)
[ https://issues.apache.org/jira/browse/RATIS-221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jing Chen updated RATIS-221: Attachment: 0001-RATIS-221-Support-new-operations-in-Arithmetic-Examp.patch > Support new operations in Arithmetic-Example (append, remove/delete) > > > Key: RATIS-221 > URL: https://issues.apache.org/jira/browse/RATIS-221 > Project: Ratis > Issue Type: New Feature > Components: examples >Affects Versions: 0.1.0-alpha >Reporter: Vinay Banakar >Assignee: Jing Chen >Priority: Major > Labels: features > Attachments: > 0001-RATIS-221-Support-new-operations-in-Arithmetic-Examp.patch > > > New operations can be supported in Arithmetic-Example to provide a more > succinct demo for the future users/developers. > 1. Adding "append" > *Command*: ./client.sh append --name X --value Y > *Behavior*: This will increment the variable X by Y. > *Alternative*: Improve "assign" to do variable increments > ./client.sh assign --name X --value X+Y > [This throws an Exception today] > 2. Adding "remove/delete" (let's just say remove for now) > *Command*: ./client.sh remove --name X > *Behavior*: This should remove variable X from the cluster. > *Alternative*: None -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-221) Support new operations in Arithmetic-Example (append, remove/delete)
[ https://issues.apache.org/jira/browse/RATIS-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584566#comment-16584566 ] Jing Chen commented on RATIS-221: - I implemented the option 2 as the option 1 has been covered. I also suggest that we could implement one more operation which allows us to list all variables. > Support new operations in Arithmetic-Example (append, remove/delete) > > > Key: RATIS-221 > URL: https://issues.apache.org/jira/browse/RATIS-221 > Project: Ratis > Issue Type: New Feature > Components: examples >Affects Versions: 0.1.0-alpha >Reporter: Vinay Banakar >Assignee: Jing Chen >Priority: Major > Labels: features > Attachments: > 0001-RATIS-221-Support-new-operations-in-Arithmetic-Examp.patch > > > New operations can be supported in Arithmetic-Example to provide a more > succinct demo for the future users/developers. > 1. Adding "append" > *Command*: ./client.sh append --name X --value Y > *Behavior*: This will increment the variable X by Y. > *Alternative*: Improve "assign" to do variable increments > ./client.sh assign --name X --value X+Y > [This throws an Exception today] > 2. Adding "remove/delete" (let's just say remove for now) > *Command*: ./client.sh remove --name X > *Behavior*: This should remove variable X from the cluster. > *Alternative*: None -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (RATIS-221) Support new operations in Arithmetic-Example (append, remove/delete)
[ https://issues.apache.org/jira/browse/RATIS-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584566#comment-16584566 ] Jing Chen edited comment on RATIS-221 at 8/18/18 1:26 AM: -- I implemented the option 2 as the option 1 has been covered. I also suggest that we could implement one more operation which allows us to list all variables. [~szetszwo] could you help me trigger the build, i don't see submit patch button in my page. Thanks was (Author: jingc): I implemented the option 2 as the option 1 has been covered. I also suggest that we could implement one more operation which allows us to list all variables. > Support new operations in Arithmetic-Example (append, remove/delete) > > > Key: RATIS-221 > URL: https://issues.apache.org/jira/browse/RATIS-221 > Project: Ratis > Issue Type: New Feature > Components: examples >Affects Versions: 0.1.0-alpha >Reporter: Vinay Banakar >Assignee: Jing Chen >Priority: Major > Labels: features > Attachments: > 0001-RATIS-221-Support-new-operations-in-Arithmetic-Examp.patch > > > New operations can be supported in Arithmetic-Example to provide a more > succinct demo for the future users/developers. > 1. Adding "append" > *Command*: ./client.sh append --name X --value Y > *Behavior*: This will increment the variable X by Y. > *Alternative*: Improve "assign" to do variable increments > ./client.sh assign --name X --value X+Y > [This throws an Exception today] > 2. Adding "remove/delete" (let's just say remove for now) > *Command*: ./client.sh remove --name X > *Behavior*: This should remove variable X from the cluster. > *Alternative*: None -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584611#comment-16584611 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064058 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogReader.java --- @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.List; + +/** + * Synchronous client interface to read from a LogStream. + */ +public interface LogReader extends AutoCloseable { + --- End diff -- Need a way to get the recordId of the current record read (getCurrentRecordId()?), it will be needed to keep a track so that we can start from where we left after any failure (using seek) > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584627#comment-16584627 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r21106 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogStream.java --- @@ -0,0 +1,109 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.util.concurrent.CompletableFuture; + +/** + * A distributed log with "infinite" length that supports reads and writes. + */ +public interface LogStream { + + /** + * Returns the unique name to identify this log. + */ + LogName getName(); + + /** + * Returns the size of this LogStream in bytes. + */ + long getSizeInBytes(); + + /** + * Returns the number of records in this LogStream. + */ + long getSizeInRecords(); + + /** + * Creates a reader to read this LogStream asynchronously. + * + * @return An asynchronous reader + */ + AsyncLogReader createAsyncReader(); + + /** + * Creates a writer to write to this LogStream asynchronously. + * + * @return An asynchronous writer + */ + AsyncLogWriter createAsyncWriter(); + + /** + * Creates a reader to read this LogStream synchronously. + * + * @return A synchronous reader + */ + LogReader createReader(); + + /** + * Creates a write to write to this LogStream synchronously. + * + * @return A synchronous writer + */ + LogWriter createWriter(); + --- End diff -- I believe the plan is to support a single writer(otherwise commit() would get tedious to manage at server), right ? can we make it getWriter()? > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584622#comment-16584622 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064260 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogWriter.java --- @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.io.IOException; +import java.nio.ByteBuffer; + +/** + * Synchronous client interface to write to a LogStream. + */ +public interface LogWriter extends AutoCloseable { + + /** + * Appends the given data as a record in the LogStream. + * + * @param data The record to append + * @return The recordId for the record just written + */ + long write(ByteBuffer data) throws IOException; + + /** + * Guarantees that all previous data appended by {@link #write(ByteBuffer)} are persisted + * and durable in the LogStream. + * + * @return TODO Unknown? + */ --- End diff -- Return last recordId committed. > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584628#comment-16584628 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064684 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogService.java --- @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.util.Iterator; +import java.util.concurrent.CompletableFuture; + +/** + * Entry point for interacting with the Ratis LogService. + */ +public interface LogService { + + /** + * Creates a new {@link LogStream} identified by the given name. Throws + * an exception if a {@link LogStream} with the given name already exists. + * + * @param name Unique name for this LogStream. + */ + CompletableFuture createLog(LogName name); --- End diff -- While creating log , we may need to add some metadata for the stream, for eg:- Details of SERDE classes, compression etc. And need the corresponding API in LogStream to get the MetaData. > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584624#comment-16584624 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064459 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogStream.java --- @@ -0,0 +1,109 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.util.concurrent.CompletableFuture; + +/** + * A distributed log with "infinite" length that supports reads and writes. + */ +public interface LogStream { + + /** + * Returns the unique name to identify this log. + */ + LogName getName(); + + /** + * Returns the size of this LogStream in bytes. + */ + long getSizeInBytes(); + + /** + * Returns the number of records in this LogStream. + */ + long getSizeInRecords(); + + /** + * Creates a reader to read this LogStream asynchronously. + * + * @return An asynchronous reader + */ + AsyncLogReader createAsyncReader(); + + /** + * Creates a writer to write to this LogStream asynchronously. + * + * @return An asynchronous writer + */ + AsyncLogWriter createAsyncWriter(); + + /** + * Creates a reader to read this LogStream synchronously. + * + * @return A synchronous reader + */ + LogReader createReader(); + + /** + * Creates a write to write to this LogStream synchronously. + * + * @return A synchronous writer + */ + LogWriter createWriter(); + + /** + * Removes the elements in this LogStream prior to the given recordId. + * + * @param recordId A non-negative recordId for this LogStream + */ + CompletableFuture truncateBefore(long recordId); + + /** + * Returns the recordId which is the start of the LogStream. When there are records which were truncated + * from the LogStream, this will return a value larger than {@code 0}. + */ + CompletableFuture getFirstRecordId(); + --- End diff -- Similarly getlastRecordId() would be helpfull. > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584623#comment-16584623 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064158 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/LogService.java --- @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.util.Iterator; +import java.util.concurrent.CompletableFuture; + +/** + * Entry point for interacting with the Ratis LogService. + */ +public interface LogService { + + /** + * Creates a new {@link LogStream} identified by the given name. Throws + * an exception if a {@link LogStream} with the given name already exists. + * + * @param name Unique name for this LogStream. + */ + CompletableFuture createLog(LogName name); + + /** + * Fetches the {@link LogStream} identified by the given name. + * + * @param name The name of the LogStream + */ + CompletableFuture getLog(LogName name); + + /** + * Lists all {@link LogStream} instances known by this LogService. + */ + CompletableFuture> listLogs(); --- End diff -- can accept a regular expression to avoid large data requested from the service. > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584625#comment-16584625 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064553 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/AsyncLogReader.java --- @@ -0,0 +1,54 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +/** + * Asynchronous client interface to read from a LogStream. + */ +public interface AsyncLogReader extends AutoCloseable { + + /** + * Seeks to the position before the record at the provided {@code recordId} in the LogStream. + * + * @param recordId A non-negative, recordId in the LogStream + * @return A future for when the operation is completed. + */ + CompletableFuture seek(long recordId) throws IOException; + --- End diff -- Can add reset() also to reset according to the logStream getFirstRecordId(). > Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-272) Design ideal API
[ https://issues.apache.org/jira/browse/RATIS-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584626#comment-16584626 ] ASF GitHub Bot commented on RATIS-272: -- Github user ankitsinghal commented on a diff in the pull request: https://github.com/apache/incubator-ratis/pull/4#discussion_r211064777 --- Diff: ratis-logservice/src/main/java/org/apache/ratis/logservice/api/ArchivedLog.java --- @@ -0,0 +1,43 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ratis.logservice.api; + +/** + * A {@link LogStream} which has been archived in some external + * system. This interface is parameterized to allow for implementations + * to use their own class to encapsulate how to find the archived log. + * + * In the majority of cases, this should be transparent to end-users, as + * the {@link LogStream} should hide the fact that this even exists. + * TODO maybe that means this should be client-facing at all? + * --- End diff -- Yes, it should not be client-facing at all. Just knowing from logStream that if I'm reading from archived or active location should be fine(recordId Design ideal API > > > Key: RATIS-272 > URL: https://issues.apache.org/jira/browse/RATIS-272 > Project: Ratis > Issue Type: Sub-task > Components: LogService >Reporter: Josh Elser >Priority: Major > > With influence from Apache DistributedLog, Kafka, and BookKeeper, design an > API that balances the ideal notion of what a distribute log system should > look like, but also considers the needs of HBase to replace a WAL. -- This message was sent by Atlassian JIRA (v7.6.3#76005)