[ 
https://issues.apache.org/jira/browse/RATIS-520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16851978#comment-16851978
 ] 

Josh Elser commented on RATIS-520:
----------------------------------

Thanks Vlad. I'm updating the Docker stuff to test this out.

I see that the custom properties for leader election timeout is reflected in 
the Metadata quorum:
{noformat}
2019-05-30 16:47:16,297 INFO server.RaftServerConfigKeys 
(ConfUtils.java:logGet(43)) - raft.server.rpc.timeout.min = 3000ms (custom)
2019-05-30 16:47:16,298 INFO server.RaftServerConfigKeys 
(ConfUtils.java:logGet(43)) - raft.server.rpc.timeout.max = 5000ms (custom)
2019-05-30 16:47:16,569 INFO server.RaftServerConfigKeys 
(ConfUtils.java:logGet(43)) - raft.server.log.segment.size.max = 8MB (=8388608) 
(default){noformat}
But it looks like the segment size isn't reflected (I set the max segment size 
to be 4MB in logservice.xml). Was this intentional, Vlad? I could see us 
starting with not letting users tweak the metadata quorum segment sizes (if 
they were stressing the metadata quorum that much that we want to tweak that, 
they're probably misusing the system anyways).

On the segment size, the logservice workers all failed because the value in the 
logservice-example.xml is wrong: {{4MB}} doesn't parse, so you see:
{code:java}
Exception in thread "main" java.lang.NumberFormatException: For input string: 
"4MB"
  at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
  at java.lang.Long.parseLong(Long.java:589)
  at java.lang.Long.parseLong(Long.java:631)
  at org.apache.ratis.conf.RaftProperties.getLong(RaftProperties.java:637)
  at 
org.apache.ratis.logservice.server.LogServer.setRaftProperties(LogServer.java:80)
  at org.apache.ratis.logservice.server.LogServer.start(LogServer.java:97)
  at org.apache.ratis.logservice.server.LogServer.main(LogServer.java:148)
Suppressed: java.lang.NullPointerException
  at org.apache.ratis.logservice.server.LogServer.close(LogServer.java:162)
  at org.apache.ratis.logservice.server.LogServer.main(LogServer.java:157){code}
After correcting my logservice.xml, I do see that the segment size is accurate:
{noformat}
2019-05-30 16:52:28,773 INFO server.RaftServerConfigKeys 
(ConfUtils.java:logGet(43)) - raft.server.log.segment.size.max = 4194304 
(custom)
2019-05-30 16:52:28,773 INFO server.RaftServerConfigKeys 
(ConfUtils.java:logGet(43)) - raft.server.log.preallocated.size = 4194304 
(custom){noformat}
So, we just need to update logservice-example.xml with 4194304 instead of 4MB 
(can do that on commit, along with the whitespace).

Let me know what you think about the segment size for the metadata quorum.

> [Configuration] Unify configuration across client and server code
> -----------------------------------------------------------------
>
>                 Key: RATIS-520
>                 URL: https://issues.apache.org/jira/browse/RATIS-520
>             Project: Ratis
>          Issue Type: Sub-task
>    Affects Versions: 0.4.0
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>            Priority: Major
>             Fix For: 0.4.0
>
>         Attachments: RATIS-520-v1.patch, RATIS-520-v2.patch, 
> RATIS-520-v3.patch
>
>
> Configuration of implementation specific details inside of Ratis itself need 
> to be created as they presently are static. The ability to configure them on 
> the fly for administration of the system is a must.
> Work breakdown:
> RATIS-477 has some implementation of LogStateMachine configuration.
> Need a method to configure the MetadataStateMachine and LogStateMachine(s) 
> with LogService-level configuration. For example:
> Command-line arguments to specify configuration key=values
> Configuration file which can be specified
> Something else… (with justification why chosen)
> Potentially, can the system be dynamically reconfigured.
> Method of configuring the system must be clearly documented



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to