Robert Varga [Sat, 9 Mar 2024 17:28:02 +0000 (18:28 +0100)]
Track channel position in explicit field
Rather than manipulating the channel, use an explicit field to keep
track of our current position.
JIRA: CONTROLLER-2095
Change-Id: I50adbef833251035f7c54ec624f9a03d59b5c7c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 17:13:01 +0000 (18:13 +0100)]
Simplify FileChannelJournalSegmentWriter position tracking
This patch makes the obvious switch in state tracking: memory buffer
does not hold anything of value w.r.t. overall state, so there is no
point in marking/resetting and maintaining memory.position() beyond
what we need for reading from it.
Local 'position' acts now as the authoritative source of where we want
to go and we propagate it to channel position when we validate an entry.
JIRA: CONTROLLER-2095
Change-Id: Iab150a3c7348c714170223b397167cd4bb87f087
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 15:03:10 +0000 (16:03 +0100)]
Improve entry crc32 computation
We have a codepath difference here, where we use either a ByteBuffer or
a raw array to compute CRC32.
MappedJournalSegmentWriter does not make it immediately clear we use
this buffer twice -- once for CRC32 and once for deserialization.
Move acquisition of slice just after we have read the expected CRC32, so
it is clear it is something we would be doing even if there were no
checksum involved.
Mirror the same in FileChannelJournalSegmentWriter, as this will allow
us to further consolidate the code and stop mucking with memory.limit(),
which is causing us to invalidate our previously-set mark.
JIRA: CONTROLLER-2095
Change-Id: I355bd97cd8acb4f5d9d91310de97ecb2cbd70282
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 14:49:37 +0000 (15:49 +0100)]
Invert checksum check
We have a hardly-visible else branch which terminates our loop. Increase
its visibility by making it a dedicated if.
JIRA: CONTROLLER-2095
Change-Id: Ia0f6901793b1847a13afc5a3da3fdd5382180606
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 14:32:01 +0000 (15:32 +0100)]
Do not use java.util.zip.Checksum
We are using this interface only for local variable type declaration,
use CRC32 directly, just as MappedJournalSegmentWriter does.
JIRA: CONTROLLER-2095
Change-Id: I054c639ae49b4fccef863a363c6e8665ea1322f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 14:29:56 +0000 (15:29 +0100)]
Reduce position changes during read
Rather than using a read() which updates the position, requiring us to
set the position again, set it only once and use read with offset --
eliminating one syscall.
JIRA: CONTROLLER-2095
Change-Id: I478ba1cbb1f5737a751b43cb6ed0d018e49e6485
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 14:13:20 +0000 (15:13 +0100)]
Clean up initial FileChannel writer reset's read
The code here bears marks of 'copy, paste and cudgel to compliance'
programming and is strikingly similar to what MappedJournalSegmentWriter
does -- except it needs to deal with reading as well.
This patch takes the first step towards sanity by eliminating a useless
if() and uses FileChannel.read(ByteBuffer, long) to reduce position
adjustments.
JIRA: CONTROLLER-2095
Change-Id: I528cb14608402a406e20d168a7e8520c9eb66edf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 13:33:11 +0000 (14:33 +0100)]
Optimize MappedJournalSegmentWriter.truncate()
Reduce code duplication by separating current position manipulation and
entry zero-out.
Also use a single putLong() instead of two putInt()s, eliminating one
range check.
Overall this makes the two implementations much more similar, allowing
sharing code at some later point in the future.
JIRA: CONTROLLER-2095
Change-Id: I9791b5e27a779210b5500a7923ccada7156f26e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 13:09:45 +0000 (14:09 +0100)]
Optimize FileChannelJournalSegmentWriter.truncate()
FileChannelJournalSegmentWriter.truncate() is inefficient in that it
zeroes-out its memory buffer and then writes it completely out.
This patch aligns it with what MappedJournalSegmentWriter does, which is
just zeroing out the entry header -- reducing both IO and CPU overheads.
JIRA: CONTROLLER-2095
Change-Id: I487157e78524cc9b00c9efff2064dbe892638ae4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 12:30:12 +0000 (13:30 +0100)]
Improve FileChannelJournalSegmentWriter.truncate()
Reduce the dance around channel position by explicitly passing it down,
thus reducing the number of syscalls we incur.
Also inline FileChannelJournalSegmentWriter.zero() and add a FIXME to
improve our zero-out strategy.
JIRA: CONTROLLER-2095
Change-Id: I885947fef51132a294c900396d902cf5481e2bd8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 12:38:05 +0000 (13:38 +0100)]
Remove unused {FileChannel,Mapped}JournalSegmentWriter methods
We have a few methods which are not used anywhere, remove them to
simplify things.
JIRA: CONTROLLER-2095
Change-Id: I508d92cc2c761a6432e24e70db400636764753c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 9 Mar 2024 09:47:49 +0000 (10:47 +0100)]
Optimize FileChannelJournalSegmentReader channel use
We use FileChannel to maintain our position for a particular reader,
which is a naive implementation.
Since FileChannel's position is tied to the underlying file descriptor,
each such manipulation involves locking and system calls.
Switch to maintaining the position ourselves and using
FileChannel.read(buffer, position), improving performance.
JIRA: CONTROLLER-2094
Change-Id: I7f462f3fd8aa9bc47c16201dd32faeb2a7c18a32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 8 Mar 2024 14:44:49 +0000 (15:44 +0100)]
Add a segmented-journal performance test case
This introduces a PerformanceTest, which tests journal entry writeout
for various sizes and metrics of how well it did.
JIRA: CONTROLLER-2043
Change-Id: Idad7575326f632366417f60a850b6d63393bdc1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 8 Mar 2024 10:29:05 +0000 (11:29 +0100)]
Migrate SegmentedFileJournalTest to JUnit5
This is a simple test, migrate it.
Change-Id: I2a02266f6029e6424945e2b23d8060cefff9bf75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 27 Jan 2024 15:15:53 +0000 (16:15 +0100)]
Migrate some tests to new ImmutableNodes
While the amount of users of deprecated methods is huge here, we byte
off a chunk of them.
Change-Id: I6722230638b12cd7eede81e532578148b133220e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 7 Mar 2024 13:31:29 +0000 (14:31 +0100)]
Add RTD configuration
RTD requires configuration, add it.
Change-Id: I620a33a647f667c7b534f6b1ac19c50fe7dc6866
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Feb 2024 09:39:19 +0000 (10:39 +0100)]
Bump Scala to 2.13.13
https://github.com/scala/scala/releases/tag/v2.13.13
Change-Id: I365019424a8969ee87837c81c4022d9853e67539
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 27 Jan 2024 14:53:00 +0000 (15:53 +0100)]
Migrate cds-access-client
We have a single test using deprecated methods, migrate it.
Change-Id: Ibfbd89c45667e88f9a147ffc791485d87e9147be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Tue, 20 Feb 2024 08:21:35 +0000 (09:21 +0100)]
Simplify verify assertions
Simplify verify assertions in
ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest class.
JIRA: CONTROLLER-2074
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: I9bfd448bfef32d5a47e99e056496da5b60abd79d
Ivan Hrasko [Mon, 19 Feb 2024 11:47:12 +0000 (12:47 +0100)]
Refactor snapshot state verification
Use dedicated list of snapshot states for leader and followers in
ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest class.
JIRA: CONTROLLER-2074
Change-Id: I06b6303585c9002d5d36b043b96fa46f5eca60cf
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Robert Varga [Sat, 27 Jan 2024 15:22:15 +0000 (16:22 +0100)]
Partially migrate WriteTransactionsHandler
We can easily migrate some of the use of deprecated methods. Make dent
in the related warnings.
Change-Id: I8e368a4899ee2719c9f40b5f4d59a8c1f9cdc0ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 27 Jan 2024 14:53:25 +0000 (15:53 +0100)]
Clean up sal-remoterpc-connector
We are using a number of deprecated methods here, clean that up.
Change-Id: I19b37967cd7cac472efff3ae6018ea008111c49b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 27 Jan 2024 14:42:41 +0000 (15:42 +0100)]
Migrate sal-clusering-commons tests
Migrate most users of deprecated Builders/ImmutableNodes.
Change-Id: I676f248cc524ebc51120352951e93e8539b1dd88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Jan 2024 09:39:23 +0000 (10:39 +0100)]
Enable requiremens in sal-distributed-datastore
The upstream issue has been fixed a few moons back, remove the
workaround we carry.
Change-Id: I5ed8030f98638f6202d4e9d67c309c704401840b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Jan 2024 06:40:31 +0000 (07:40 +0100)]
Modernize clustering-test-app
Do not use deprecated constructs, for the most part at least.
Change-Id: I4ca96966407129d6cb60abf2d64d718065c298ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Jan 2024 09:31:47 +0000 (10:31 +0100)]
Bump versions to 9.0.1-SNAPSHOT
This starts the next development iteration.
Change-Id: I27cfca0f285d9a4c6eb1d99401947c62a4fcfc8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 22 Jan 2024 08:19:14 +0000 (08:19 +0000)]
Release controller
Robert Varga [Mon, 22 Jan 2024 06:34:01 +0000 (07:34 +0100)]
Migrate cds-access-api to ImmutableNodes
Use yang-data-spi version of immutable nodes.
Change-Id: Ic4052e3877caf828586f2756e6b5e555fe9ac255
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 01:07:57 +0000 (02:07 +0100)]
Migrate ShardDataTreeSnapshotTest
This is a straightforward replace of Builders-only call sites.
Change-Id: Id38446025310579478ecd03203bd632f6c522af8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Jan 2024 13:49:28 +0000 (14:49 +0100)]
Migrate users of deprecated methods
Change-Id: I8eac554e9e74d427e4f3dc3ef9ea62b1f8b4add3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 19:16:42 +0000 (20:16 +0100)]
Eliminate OSGiDOMDataBroker
Fold instantiation wiring into ConcurrentDOMDataBroker, which ends up
being really simple integration.
Change-Id: I70fa7a6422de11f7cbdc8c8c71e95d2410b9d1ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 19:09:19 +0000 (20:09 +0100)]
Factor out DataBrokerCommitExecutor
DataBrokerCommitExecutor holds the executor service and manages its
statistics and lifecycle. This leaves OSGiDOMDataBroker absolutely bare
forwarder.
Change-Id: I55751c49c40aba9cfad289e0a1b913241df4f66f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 18:50:09 +0000 (19:50 +0100)]
Convert OSGiDOMDataBroker to ForwardingDOMDataBroker
mdsal.dom.spi provides us with the base substrate we need to forward
things efficiently. Use that and constructor injection to simplify
things a lot.
Change-Id: I77625c5f217f2b92a3bb460b60e3bbb549616da7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 8 Jan 2024 10:36:29 +0000 (11:36 +0100)]
Bump upstreams
Adopt:
- yangtools-13.0.1
- mdsal-13.0.0
Also adopts AbstractDOMDataBroker from mdsal-dom-spi, so that we have
less code duplication and maintenance.
UTs mocking NormalizedNode are updated to ContainerNode, as mocking
sealed classes does not work with Mockito (out of the box).
Change-Id: I6d3d3c8ced297b6850aea951040d16437df9e3f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 20 Jan 2024 13:14:52 +0000 (14:14 +0100)]
Remove odl-controller-exp-netty-config
Remove all of configuration remnants, as there is just a single
downstream user.
JIRA: CONTROLLER-2092
Change-Id: I2d0bb01cfd061c2f0086fcc80b27e6b0a336e5dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Jan 2024 10:16:08 +0000 (11:16 +0100)]
Remove support for actions/rpc/notifications, take two
The concepts underlying what we are doing here are gone from MD-SAL.
Update the version of the XML namespace and remove support for
- action-implementation
- action-instance
- notification-listener
- rpc-implementation
- rpc-service
- specific-reference-list
- static-reference
JIRA: CONTROLLER-2090
Change-Id: Ic9777d1d6295da3f31da7b22d816c0fc9ba9565e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Jan 2024 10:02:20 +0000 (11:02 +0100)]
Warn on deprecated blueprint elements
A number of elements are going away, issue a warning when each is
encountered.
JIRA: CONTROLLER-2090
Change-Id: I91cd29f4824e617572e3f17a593df431d0c72efe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Jan 2024 07:59:32 +0000 (08:59 +0100)]
Revert "Remove support for actions/rpc/notifications"
This reverts commit
beaac808943b25f5627c70ddb5029408101204a7.
JIRA: CONTROLLER-2090
Change-Id: I3a624a4c5ef8159d2667794f734609f0a2be3e5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Jan 2024 07:59:11 +0000 (08:59 +0100)]
Revert "Fix namespace handling"
This reverts commit
82284ce97ea00c26af1cad479211ce1fed68a533.
JIRA: CONTROLLER-2090
Change-Id: Idea6406166193fdebeedfc828aaef7173d1cd681
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 15:46:41 +0000 (16:46 +0100)]
Fix namespace handling
The previous patch missed an update to namespace versions, fix that up.
JIRA: CONTROLLER-2090
Change-Id: Id780a60ed629cdb862a56c616b78679a7d6f3d25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 03:53:19 +0000 (04:53 +0100)]
Use simple RPC registrations
We are registering a single implementation, use simpler API alternative
to achieve the same thing.
Change-Id: I8ada5656eebf355357e6b2ca651e967343645697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 10 Jun 2022 11:35:31 +0000 (13:35 +0200)]
Remove shard-snapshot-chunk-size
Remove shard-snapshot-chunk-size and replace its occurrences
with maximum-message-slice-size.
JIRA: CONTROLLER-1980
Change-Id: Iab862d0789b75a89b6476b4ec048d7344362adf2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 01:40:54 +0000 (02:40 +0100)]
Migrate NotificationIT
We are just collecting notifications, which is easily catered to by a
simple API -- to the point of not needing a class and getting by with
method handles.
Change-Id: I140c734a1fe882196f174d00eb825ff635481385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jan 2024 00:34:42 +0000 (01:34 +0100)]
Convert notification listeners
PeopleCarListener and YnlListener are listening to a single
notification. Trivially convert them, renaming PeopleCarLister to
CarBoughtListener (which is what it is).
Change-Id: Iaf04257d3b3682cd801e4dabeb5f9e7cb81f0d6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 17:18:35 +0000 (19:18 +0200)]
Do not use RpcService in provider
Migrated usage of RpcService to Rpc<?,?> for provider.
JIRA: CONTROLLER-2085
Change-Id: I38d66761df26506c383402e32b5fe605d05dcda8
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Robert Varga [Mon, 15 Jan 2024 12:55:23 +0000 (13:55 +0100)]
Remove support for actions/rpc/notifications
The concepts underlying what we are doing here are gone from MD-SAL.
Update the version of the XML namespace and remove support for
- action-implementation
- action-instance
- notification-listener
- rpc-implementation
- rpc-service
- specific-reference-list
- static-reference
JIRA: CONTROLLER-2090
Change-Id: I7d9c992108378283a83ce80d6612794ccac1730e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Jan 2024 11:59:02 +0000 (12:59 +0100)]
Switch KitchenServiceImpl to CompositeListener
Do not use generated ToasterListener, just internalize the dispatch
methods.
Change-Id: I3ab8948a07003d9d563dd9b8282c550406f6d1b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Jan 2024 07:13:08 +0000 (08:13 +0100)]
Migrate ntfbenchmark
The model is using only a single notification, do not use generated
Listener.
Change-Id: I3f9f4074994fd0ad133f21de1b44cdfd277f4858
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 17:35:03 +0000 (19:35 +0200)]
Do not use RpcService in sal-binding-it
Migrated usage of RpcService to Rpc<?,?> for sal-binding-it.
JIRA: CONTROLLER-2085
Change-Id: Ibe0b76a344e935a55ed5e975a212a43526c20af1
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 17:21:55 +0000 (19:21 +0200)]
Do not use RpcService in toaster-consumer
Migrated usage of RpcService to Rpc<?,?> for toaster-consumer.
JIRA: CONTROLLER-2085
Change-Id: I85db90c9a2fe104bded1835ae9d4263e893311bb
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 15:51:09 +0000 (17:51 +0200)]
Do not use RpcService in sal-cluster-admin-impl
Migrated usage of RpcService to Rpc<?,?> for sal-cluster-admin-impl.
Also ditch dependency on mdsal-binding-dom-codec-api, as it is not used
anywhere.
JIRA: CONTROLLER-2085
Change-Id: I5bfcc0646b73b18a540504406b8457fc83eb598f
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 17:31:01 +0000 (19:31 +0200)]
Do not use RpcService in toaster-provider
Migrated usage of RpcService to Rpc<?,?> for toaster-provider.
JIRA: CONTROLLER-2085
Change-Id: I30c112ba11eb14cc645e4dd7d76758bead3a7de2
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 8 Jan 2024 19:21:28 +0000 (20:21 +0100)]
De-prioritize ask-based messages
Reorganize message checking order so that ask-based messages are checked
just before we would be proclaiming an unknown message.
JIRA: CONTROLLER-2054
Change-Id: I2e8a1c5cc295547a994f6cf45bc73cbea607bc08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 09:10:25 +0000 (10:10 +0100)]
Deprecate ask-based protocol messages
Since we have removed the ask-based client, we really have no way of
testing ask-based messages' interaction with Shard.
We keep Shard compatible, but deprecate all ask-based messages and
methods/classes dealing with them on the backend.
JIRA: CONTROLLER-2054
Change-Id: I5764713b686ae11f8d750e691576b6d20637ab7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 8 Jan 2024 16:38:06 +0000 (17:38 +0100)]
Remove TransactionReadyReplyMapper
Pre-Lithium verions are long desupported, remove this now unused class.
Change-Id: Ic0a0a03c93735444371c99fdcb4e3f5b34dc68a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 16:57:49 +0000 (18:57 +0200)]
Do not use RpcService in karaf-cli
Migrated usage of RpcService to Rpc<?,?> for karaf-cli.
JIRA: CONTROLLER-2085
Change-Id: Ia27b7afda63b9a9208d187a826a14556c30813f9
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 16:29:11 +0000 (18:29 +0200)]
Do not use RpcService in sal-cluster-admin-karaf-cli
Migrated usage of RpcService to Rpc<?,?> for sal-cluster-admin-karaf-cli.
JIRA: CONTROLLER-2085
Change-Id: I6cf42319c180df1ec89293abb6165041d3b99f88
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 13:05:11 +0000 (15:05 +0200)]
Do not use RpcService in eos-dom-akka
Migrated usage of RpcService to Rpc<?,?> for eos-dom-akka.
JIRA: CONTROLLER-2085
Change-Id: I73e1df47915caacb021c97d60f0837ad27987d8e
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksandr Zharov [Thu, 28 Sep 2023 12:23:34 +0000 (14:23 +0200)]
Do not use RpcService in rpcbenchmark
Migrated usage of RpcService to Rpc<?,?> for rpcbenchmark.
JIRA: CONTROLLER-2085
Change-Id: I425f0669fd7b9a324c31f392d9f0bd39e988e237
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 5 Jan 2024 20:01:06 +0000 (21:01 +0100)]
Seal TransmitQueue
There should ever only be two implementations, seal the base class.
Change-Id: I2a511e49a5b29c89f5c3849972f298d98137462b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 04:44:51 +0000 (05:44 +0100)]
Refactor ActorInitialized
This message is only ever sent from Shard to ShardManager, which its
parent.
Change it to a record holding the actor reference, so that users do not
need to muck with getSender().
Change-Id: Ib26c328e60c8bfd86075e12c39c271978f157d15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 05:15:06 +0000 (06:15 +0100)]
Do not use Optional for leaderAddress
Optional is a largely-superfluous indirection. Use a nullable return
and adjust users.
Change-Id: Ic453039e174a94c55c3821c807202ba2cead0c9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 05:01:47 +0000 (06:01 +0100)]
Do not use optional in ShardLeaderStateChanged
Use a simple nullable, as all users know what's going on.
Change-Id: I931e71763d137c5a50432604214a75e0bfdcdd37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 12:16:35 +0000 (13:16 +0100)]
Bump Kryo to 4.0.3
https://github.com/EsotericSoftware/kryo/releases/tag/kryo-parent-4.0.3
Change-Id: Iebb8fb4a24c2406053a77fc141fc6ed8ad9b2462
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 18:36:31 +0000 (19:36 +0100)]
Make LocalSnapshotStore final
We have a SpotBugs suppression which ends up being unnecessary if the
class is final.
Change-Id: If58497303871ae136875c80b8b094276ccda9d64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 14:38:29 +0000 (15:38 +0100)]
Turn LongSerdes into an enum
Use proper singleton for reuse.
JIRA: CONTROLLER-2089
Change-Id: Ia03b8610370521e97e45f67def07a32f1bf7d59b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 14:39:50 +0000 (15:39 +0100)]
Rename DataJournalEntrySerializer
DataJournalEntrySerdes is the proper name, use that.
JIRA: CONTROLLER-2089
Change-Id: I53247f7b226ed7ab0ff42ac24ad6f4d549e5db97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 11:58:53 +0000 (12:58 +0100)]
Modernize sal-akka-segmented-journal
Use local variable type inference, instanceof patterns and seal
DataJournalEntry.
JIRA: CONTROLLER-2089
Change-Id: I3c2ee2de5eaae6874e2f75a44dfd6fce0942e8ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 12:30:50 +0000 (13:30 +0100)]
ServerInfo should be a plain record
This is a pure DTO, turn it into a record, eliminating quite a bit of
verbosity.
Also clean up RaftActorContextImpl.updatePeerIds() so we do not juggle
two booleans and set/reset our voting status.
Change-Id: Ifbb2ae0c8163472b8ef3b59210f12dccb1b8e30d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 03:31:50 +0000 (04:31 +0100)]
Merge ClientRequestTracker
The split between interface and implementation is completely
unnecessary, this is just a simple DTO.
Change-Id: Ie10a68b003b6ef82f59fb298cd433c8b876afcc3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 03:15:08 +0000 (04:15 +0100)]
Do not leak ReplicatedLogEntry in Replicate message
While convenient, this is a leak of constructs and contains a debug-only
access to data. While we are at it make Replicate a simple record.
JIRA: CONTROLLER-2044
Change-Id: I92a364a9590771f0bb9278e2e8ca8176691b8f75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 02:25:32 +0000 (03:25 +0100)]
Introduce CommitTransactionPayload.CandidateTransaction
Do not use an Entry but rather a dedicated type, which allows us to
unbox things a bit.
Change-Id: I16e97cbe8aa6e3f4f9543a9f71a95a09191689c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 00:45:01 +0000 (01:45 +0100)]
FrontendClientMetadata(Builder) should not be Identifiable
Expose a clientId() to internal package users instead.
Change-Id: I7f14170a50e04a5d8752c24a7137c218b9960082
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 00:24:42 +0000 (01:24 +0100)]
Seal FrontendClientMetadataBuilder
This is a simple specialization, seal it.
Change-Id: I5516da14e423b83369e5da1c64e45da3c2ed24d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 00:19:58 +0000 (01:19 +0100)]
Seal AbstractProxyTransaction
Class hierarchy here is firmly defined, express that through
seal/permits.
Change-Id: I3fc8f04133a788b0c89e156d0e8deb5a5abead7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 02:39:35 +0000 (03:39 +0100)]
Access clientActor exactly once
Make sure the null check is explicit to everyone.
Change-Id: I299728e411712ad73a83e78d66d078b0d79453b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 00:23:35 +0000 (01:23 +0100)]
Turn ShardContainer into a record
We have Java 17 now, use a record instead of a final class.
Change-Id: I340bf3f288ef8264dafc7d77403c5482f307a671
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 21:58:36 +0000 (22:58 +0100)]
Use instanceof patterns in ShardManager
Reduce the amount of casts we perform by using instanceof patterns.
Change-Id: I918a15cf52f67ee072a1e7e88d5624bf161cdb3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 22:08:37 +0000 (23:08 +0100)]
Use a switch expression in getServerChangeException()
Improve clarity and defenses by using a switch expression, which ensures
we cover all cases.
Change-Id: Ibe39c25a780b1776985ffdb1d968c58fa922f51d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 Dec 2023 00:12:30 +0000 (01:12 +0100)]
ShardDataTreeCohort should not be identifiable
Having a public getIdentifier() member does not make carry domain
information.
Define a package-local transactionId() method serving the same purpose.
Change-Id: If60b02ea6a07b094cd655e3c50dc6ba428c263c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 23:56:20 +0000 (00:56 +0100)]
Seal LeaderFrontendState
We have only internal implementations, express that in the class
hierarchy explicitly.
Change-Id: I56dda91d8c14fc4e6ed10424dfbc5da2629092cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 21:46:02 +0000 (22:46 +0100)]
Do not use static import for Patterns.ask()
Improve call site visibility by explicitly referencing this method as
Patterns.ask().
Change-Id: I94f21ba9a5e2d0a2e3de89f6826896ea98a24641
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 20:40:18 +0000 (21:40 +0100)]
Remove SuccessReply
This message is not used, remove it.
Change-Id: I23c9be05063d7ed92779e4fb66904a0fd848062d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 20:39:31 +0000 (21:39 +0100)]
Deprecate SuccessReply for removal
This class is not used anywhere, deprecate it for removal.
Change-Id: I26b51aeda81ed9811171b53e9f797baa1c2bf994
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 20:45:29 +0000 (21:45 +0100)]
Remove EmptyExternalizable
This class is not used, remove it.
Change-Id: I1cd54f24b07075c386f357c9be7af486985239b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 20:44:53 +0000 (21:44 +0100)]
Deprecate EmptyExternalizable for removal
This class is not used anywhere, deprecate it for removal.
Change-Id: I3303a14570bfadaa524841e7622f20dd955f67e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bentom-binoy [Tue, 7 Nov 2023 06:44:41 +0000 (06:44 +0000)]
Remove ask-based protocol client
Remove the use-tell-based-protocol knob, effectively making it always
true.
This means DistributedDataStore cannot be instantiated, which leads to
its removal. That in turn makes all of DatastoreContext,
OperationLimiter and similar classes superfluous, so we remove those as
well.
A few classes are used to drive the shard backend in integration tests,
and hence those are moved to test sources.
JIRA: CONTROLLER-2054
Change-Id: Ie20b1c898576d3c89b70b34121310e58faddbf8e
Signed-off-by: bentom-binoy <bentom.binoy@infosys.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 30 Dec 2023 19:58:06 +0000 (20:58 +0100)]
Unconditionally remove knownFrontends
As noted in the comment, known frontends end up being restored from
metadata when we unpause (or become leader for that matter).
The DatastoreContext property being used in this conditional is a
frontend thing anyway, so the only thing it could really affect is
tests.
The only case where this would be needed is when we are the leader, have
started persisting the DisableTrackingPayload, but it has not propagated
during pause/unpause.
That is okay, as the leader handover ensures that all locally-appended
entries are appended, so that the new leader just continues on.
Change-Id: Icf775823aed91c15f7a8f74fa2f07faee3a084a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 11:10:26 +0000 (12:10 +0100)]
Migrate ActorBehaviorTest to JUnit5
Eliminate the need for mockito-subclass by migrating to JUnit5 and
correcting mocking configuration.
Change-Id: I3d3a772abe71e0d0576474aa9f2b22cef7fbea0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 02:10:21 +0000 (03:10 +0100)]
Clean up DistributedDataStoreRemotingIntegrationTest
Migrate checks so they do not reference DistributedDataStore.
JIRA: CONTROLLER-2054
Change-Id: I3735f45661a31bed1e5da14750e48b7fefd782da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 01:52:25 +0000 (02:52 +0100)]
Do not special-case AbstractDistributedDataStoreIntegrationTest
AbstractDistributedDataStoreIntegrationTest has a few references to
DistributedDataStore. Remove them in favor of alternatives assuming
ClientBackedDataStore.
JIRA: CONTROLLER-2054
Change-Id: I99ae9584b9dd14cc39f7ca23eac56d9deef472d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 01:12:38 +0000 (02:12 +0100)]
Remove ask-based datastore integration tests
Eliminate DistributedDataStore as an argument.
JIRA: CONTROLLER-2054
Change-Id: If44dd72706c028f5d3901a759549fec27257d5d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 00:56:48 +0000 (01:56 +0100)]
Remove DistributedDataStoreTest
Rehost the tests for waiting into ClientBackedDataStoreTest, leaving
only limiter tests around -- and those are no longer useful.
JIRA: CONTROLLER-2054
Change-Id: Idf908cd33110c610c8fe0c0b37cd69dabdd3f367
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 01:44:19 +0000 (02:44 +0100)]
Switch MemberNode to ClientBackedDatastore
DistributedDataStore is on its way out, switch to using the sole
AbstractDataStore implementation.
JIRA: CONTROLLER-2054
Change-Id: I5a8ee344c56a7a768c373ffa4bc489ef249529ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 01:57:39 +0000 (02:57 +0100)]
Switch DataTreeCohortIntegrationTest to tell-based datastore
DistributedDataStore is going away and this test should not care anyway.
Migrate it to use ClientBackedDataStore.
JIRA: CONTROLLER-2054
Change-Id: I67f92c91a8aa441ac52a5f9ad9c178c5c6faff01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 07:28:57 +0000 (08:28 +0100)]
Bump versions to 9.0.0-SNAPSHOT
This starts the next major development iteration.
Change-Id: I4b34962db224b70d3c13f365acbb5f0986937fed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 07:27:57 +0000 (08:27 +0100)]
Bump versions to 8.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: Ib1a36a0278af6034f2378fa91a7e2103b9abf0ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Fri, 29 Dec 2023 05:11:03 +0000 (05:11 +0000)]
Release controller
Robert Varga [Fri, 29 Dec 2023 02:40:00 +0000 (03:40 +0100)]
Clean up Shard a bit
Use instanceof patterns and local variable type inference to simplify
code a bit.
Change-Id: If437909b1a012a60fa5fd296dda6bffeb161fd25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Dec 2023 01:19:26 +0000 (02:19 +0100)]
{Start,Stop}DropMessages is generic
Add a diamond to constructor invocations to remove warnings.
Change-Id: I29f063eaf65656aef6715a8fe710e2afb35169e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>