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

Tsz Wo Nicholas Sze commented on RATIS-176:
-------------------------------------------

- Since maxBufferSize is fixed value, let's pass it in the RaftLog constructor 
so that we don't have to add a parameter to append(..).  i.e. move 
RaftServerImpl.maxBufferSize to RaftLog.maxBufferSize.
-* This will as well fix the new javadoc warning.
- For the test, we don't need to restart the cluster. Just set the property in 
setup().
{code}
   @Before
   public void setup() throws IOException {
+    final RaftProperties prop = getProperties();
+    RaftServerConfigKeys.Log.Appender.setBufferCapacity(prop, 
SizeInBytes.valueOf("4KB"));
+
     cluster = newCluster(NUM_PEERS);
     cluster.start();
   }
{code}


> Log Appender should throw an Exception in case  append entry size exceeds the 
> maxBufferSize configured
> ------------------------------------------------------------------------------------------------------
>
>                 Key: RATIS-176
>                 URL: https://issues.apache.org/jira/browse/RATIS-176
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Shashikant Banerjee
>            Assignee: Shashikant Banerjee
>            Priority: Minor
>         Attachments: RATIS-176.003.patch
>
>
> LogAppender while adding append entry in LogEntryBuffer, checks whether the 
> total allocated for all entries does not exceed the maxBufferSize allocated. 
> In case, the size exceeds the limit ,entries are not added to the buffer but 
> no exception is thrown . This case needs to be handled.



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

Reply via email to