Release 3.0.0 is available
Download
This is a major new version that contains 100 improvements and bug fixes. It introduces new features like pluggable metrics and lease read, etc.
See the changes between 2.5.1 and 3.0.0 releases as below:
Change list of ratis 3.0.0
In total, there are roughly 100 commits diffing from 2.5.1
Incompatible Changes
-
RaftStorage Auto-Format
-
RATIS-1677. Do not auto format RaftStorage in RECOVER. (#718)
-
RATIS-1694. Fix the compatibility issue of RATIS-1677. (#731)
-
RATIS-1871. Auto format RaftStorage when there is only one
directory configured. (#903)
-
Pluggable Ratis-Metrics (RATIS-1688)
-
RATIS-1689. Remove the use of the thirdparty Gauge. (#728)
-
RATIS-1692. Remove the use of the thirdparty Counter. (#732)
-
RATIS-1693. Remove the use of the thirdparty Timer. (#734)
-
RATIS-1703. Move MetricsReporting and JvmMetrics to impl. (#741)
-
RATIS-1704. Fix SuppressWarnings(“VisibilityModifier”) in
RatisMetrics. (#742)
-
RATIS-1710. Refactor metrics api and implementation to separated
modules. (#749)
-
RATIS-1712. Add a dropwizard 3 implementation of ratis-metrics-api. (#751)
-
RATIS-1391. Update library dropwizard.metrics version to 4.x (#632)
-
RATIS-1601. Use the shaded dropwizard metrics and remove the
dependency (#671)
-
Streaming Protocol Change
-
RATIS-1569. Move the asyncRpcApi.sendForward(..) call to the
client side. (#635)
New Features
- Leader Lease (RATIS-1864)
- RATIS-1865. Add leader lease bound ratio configuration (#897)
- RATIS-1866. Maintain leader lease after AppendEntries (#898)
- RATIS-1894. Implement ReadOnly based on leader lease (#925)
- RATIS-1882. Support read-after-write consistency (#913)
- StateMachine API
- RATIS-1874. Add notifyLeaderReady function in IStateMachine (#906)
- RATIS-1897. Make TransactionContext available in DataApi.write(..). (#930)
- New Configuration Properties
- RATIS-1862. Add the parameter whether to take Snapshot when
stopping to adapt to different services (#896)
- RATIS-1930. Add a conf for enable/disable majority-add. (#961)
- RATIS-1918. Introduces parameters that separately control the
shutdown of RaftServerProxy by JVMPauseMonitor. (#950)
- RATIS-1636. Support re-config ratis properties (#800)
- RATIS-1860. Add ratis-shell cmd to generate a new raft-meta.conf. (#901)
Improvements & Bug Fixes
Streaming & Netty
- RATIS-1550. Rewrite stream client reply queue. (#740)
- RATIS-1847. Stream has memory leak. (#884)
- RATIS-1850. When the stream server side receives a disconnection,
memory is cleared (#887)
- RATIS-1853. When the stream server channelInactive, all requests in
the channel. (#889)
- RATIS-1880. Optimize Stream client&server side channel pipeline Create (#910)
- RATIS-1898. Netty should use EpollEventLoopGroup by default (#931)
- RATIS-1899. Use EpollEventLoopGroup for Netty Proxies (#932)
- RATIS-1913. Assert that the primary peers in DataStreamClient and
RoutingTable are equal (#945)
- RATIS-1921. Shared worker group in WorkerGroupGetter should be closed. (#955)
- RATIS-1923. Netty: atomic operations require side-effect-free
functions. (#956)
Read Index
- RATIS-1856. Notify apply index change of all RaftLog entries (#893)
- RATIS-1895. IllegalStateException: Failed to updateIncreasingly for
nextIndex. (#926)
- RATIS-1861. NullPointerException in readAsync when Ratis leader is
changing (#895)
- RATIS-1888. Handle exception of readIndexAsync in gRPC readIndex impl (#920)
- RATIS-1927. Use double check to eliminate data race in ReadRequests. (#958)
RaftServer
- RATIS-1924. Increase the default of raft.server.log.segment.size.max. (#957)
- RATIS-1892. Unify the lifetime of the RaftServerProxy thread pool (#923)
- RATIS-1889. NoSuchMethodError:
RaftServerMetricsImpl.addNumPendingRequestsGauge #922 (#922)
- RATIS-761. Handle writeStateMachineData failure in leader. (#927)
- RATIS-1902. The snapshot index is set incorrectly in
InstallSnapshotReplyProto. (#933)
- RATIS-1912. Fix infinity election when perform membership change. (#954)
- RATIS-1858. Follower keeps logging first election timeout. (#894)
AppendEntries & GrpcLogAppender
- RATIS-1804. Change the default number of outstanding append entries. (#838)
- RATIS-1883. Next Index should be always larger than Match Index in
GrpcLogAppender (#914)
- RATIS-1886. AppendLog sleep fixed time cause significant drop in
write throughput. (#929)
- RATIS-1909. Fix Decreasing Next Index When GrpcLogAppender Reset
Client. (#939)
- RATIS-1920. NPE in AppendLogResponseHandler. (#952)
- RATIS-1928. Join the LogAppenders when closing the server. (#959)
- RATIS-1705. Fix metrics leak (#744)
RaftLog & RaftLog Cache
- RATIS-1887. Gap between segement log (#919)
- RATIS-1890. SegmentedRaftLogCache#shouldEvict should only iterate
over closed segments once (#921)
- RATIS-1893. In SegmentedRaftLogCache, start a daemon thread to
checkAndEvictCache. (#924)
- RATIS-1884. Fix retry cache warning condition (#915)
- RATIS-872. Invalidate replied calls in retry cache. (#942)
- RATIS-1916. OrderAsync does not call handReply. (#948)
Common Utilities
- RATIS-1932. Create zero-copy Marshaller. (#962)
- RATIS-1910. Deduplicate RaftGroupId and ClientId. (#940)
- RATIS-1867. To uniformly manage the timeout parameters for detecting
gc. (#899)
Code Cleanup & Refactoring
- RATIS-1870. Refactor hasMajority code during configuration changes. (#902)
- RATIS-1848. Simplify PeerMap inheritance (#885)
- RATIS-1849. Remove unused getRaftClient (#886)
- RATIS-1854. Remove useless error logs when closing the ratisclient
writing thread (#890)
- RATIS-1904. Refactor RaftServerImpl.submitClientRequestAsync(..). (#935)
Code Improvement
- RATIS-1852. Fix trivial SonarLint complains (#888)
- RATIS-1855. Fix some sonar code smell and bugs in ratis-server (#892)
- RATIS-1903. Fix parameter number warning in RaftClientRequest. (#934)
- RATIS-1905. Fix some sonar lint complains (#936)
- RATIS-1915. Do not use FileInputStream/FileOutputStream in
ratis-common. (#947)
- RATIS-1917. Print Epoll.unavailabilityCause() only once. (#949)
- RATIS-1919. Fix some sonar code smell and bugs in
ratis-client/common/grpc (#951)
Documentations & Examples
- RATIS-1842. Fix typo of “configuraions.md” name in ratis-docs project (#880)
- RATIS-1843. Add existing markdown documents to site.xml in the
ratis-docs project (#881)
- RATIS-1901. Update Counter example to benchmark performance. (#953)
- RATIS-1908. Keep configurations doc updated (#938)
- RATIS-1911. Add MembershipManager example. (#941)
Tests
- RATIS-1828. Enable TestServerRestartWithNetty (#869)
- RATIS-1830. Intermittent failure in TestRetryPolicy (#871)
- RATIS-1832. Intermittent failure in TestStreamObserverWithTimeout (#873)
- RATIS-1833. Intermittent failure in
TestRaftStateMachineExceptionWithSimulatedRpc (#874)
- RATIS-1599. Fix test failure from RATIS-1569. (#659)
Build & Maven
- RATIS-1829. Support magic links to PR and JIRA in IDEA (#870)
- RATIS-1878. checkstyle fails with UnsupportedClassVersionError. (#909)
- RATIS-1906. Bump copyright year to 2023 (#937)
- RATIS-1914. Bouncy Castle For Java LDAP injection vulnerability. (#944)
- RATIS-1929. Bump ratis-thirdparty version to 1.0.5 (#960)
It has been tested with Apache Ozone, Apache IoTDB, Alluxio
where Apache Ratis is used to replicate raw data and to provide high availability.