-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-28791 : Use MessageSerializer to transfer metastorage DTO's in DataBag #13409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shishkovilja
merged 31 commits into
apache:master
from
Vladsz83:IGNITE-28791-Use-MessageSerializer-to-transfer-metastorage-DTO's-in-DataBag
Aug 5, 2026
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
566821e
raw
Vladsz83 8239bf1
Merge branch 'master' into IGNITE-28791-Use-MessageSerializer-to-tran…
Vladsz83 3b10bea
impl
Vladsz83 f086a96
manual review
Vladsz83 9036a04
Merge remote-tracking branch 'my/IGNITE-28791-Use-MessageSerializer-t…
Vladsz83 15240e9
cjeckstyle
Vladsz83 0a9be11
Merge branch 'master' into IGNITE-28791-Use-MessageSerializer-to-tran…
Vladsz83 75ce047
+ master, checkstyle, manual review
Vladsz83 8aad319
manual review, better javadocs
Vladsz83 d48f781
manual review, better javadocs
Vladsz83 512725c
manual review, better javadocs
Vladsz83 63de114
fix
Vladsz83 4fb5099
review fixes
Vladsz83 3bea3df
Merge branch 'master' into IGNITE-28791-Use-MessageSerializer-to-tran…
Vladsz83 eebe0d6
fix
Vladsz83 cf87198
review fixes
Vladsz83 f1523b5
review fixes
Vladsz83 34574e9
fix
Vladsz83 c357181
fixes
Vladsz83 16ad874
fix
Vladsz83 b310027
Update modules/core/src/main/java/org/apache/ignite/internal/processo…
Vladsz83 f72e938
fix
Vladsz83 daee4b4
Review fixes
Vladsz83 89b540e
Merge branch 'master' into IGNITE-28791-Use-MessageSerializer-to-tran…
Vladsz83 491ab40
+ master
Vladsz83 a01d228
fix
Vladsz83 f82333c
fix
Vladsz83 d454c43
fix
Vladsz83 ec731be
test fixes
Vladsz83 7de5954
test fixes
Vladsz83 75b0b97
Merge branch 'master' into IGNITE-28791-Use-MessageSerializer-to-tran…
Vladsz83 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...internal/processors/metastorage/persistence/DistributedMetaStorageHistoryItemMessage.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| /* | ||
| * 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.ignite.internal.processors.metastorage.persistence; | ||
|
|
||
| import java.io.Serializable; | ||
| import org.apache.ignite.internal.Order; | ||
| import org.apache.ignite.internal.dto.IgniteDataTransferObject; | ||
| import org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage; | ||
| import org.apache.ignite.plugin.extensions.communication.Message; | ||
| import org.jetbrains.annotations.Nullable; | ||
|
|
||
| /** | ||
| * Transfer wrap for {@link DistributedMetaStorageHistoryItem} which is a persistent {@link IgniteDataTransferObject} stored | ||
| * by {@link MetaStorage} using the dedicated code-generated DTO-serializer. | ||
| * | ||
| * @see DistributedMetaStorageHistoryItem | ||
| * @see DmsDataWriter#write(String, byte[]) | ||
| * @see MetaStorage#write(String, Serializable) | ||
| */ | ||
| public class DistributedMetaStorageHistoryItemMessage implements Message { | ||
| /** */ | ||
| @Order(0) | ||
| String[] keys; | ||
|
|
||
| /** */ | ||
| @Order(1) | ||
| byte[][] valBytes; | ||
|
|
||
| /** Empty constructor for serialization purposes. */ | ||
| public DistributedMetaStorageHistoryItemMessage() { | ||
| // No-op. | ||
| } | ||
|
|
||
| /** */ | ||
| DistributedMetaStorageHistoryItemMessage(String[] keys, byte[][] valBytes) { | ||
| this.keys = keys; | ||
| this.valBytes = valBytes; | ||
| } | ||
|
|
||
| /** @return {@link Message} wraps array for {@code hist}. */ | ||
| static @Nullable DistributedMetaStorageHistoryItemMessage[] toMessages(@Nullable DistributedMetaStorageHistoryItem[] hist) { | ||
| if (hist == null) | ||
| return null; | ||
|
|
||
| var res = new DistributedMetaStorageHistoryItemMessage[hist.length]; | ||
|
|
||
| for (int i = 0; i < hist.length; ++i) | ||
| res[i] = new DistributedMetaStorageHistoryItemMessage(hist[i].keys, hist[i].valBytesArr); | ||
|
|
||
| return res; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.