Skip to content

IGNITE-25090 Move binary classes to binary-api#12362

Merged
nizhikov merged 16 commits into
apache:masterfrom
nizhikov:IGNITE-25090
Sep 24, 2025
Merged

IGNITE-25090 Move binary classes to binary-api#12362
nizhikov merged 16 commits into
apache:masterfrom
nizhikov:IGNITE-25090

Conversation

@nizhikov
Copy link
Copy Markdown
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

ThreadLocal.withInitial(BinaryContextHolder::new);

/** Binary context supplier. */
private static Supplier<BinaryContext> BINARY_CTX_SUPPLIER;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an idea for the future of how to get rid of this supplier.

I scanned the code and found that IgnitionEx.localIgnite().context().cacheObjects().binaryContext() call returns the same instance of BinaryContext as arrives to GridBinaryMarshaller constructor.

So we could replace this vague trick with supplier initialized from KernalContext implementations with a static atomic reference which we set from the constructor.

But ultimately one would want to see this static BINARY_CTX stuff refactored to BinaryUtils or to some separate component.


if (schema == null) {
BinaryTypeImpl meta = (BinaryTypeImpl)cacheObjProc.metadata(typeId);
BinaryTypeImpl meta = (BinaryTypeImpl)metadataProvider.apply(typeId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could use BinaryContext#metadata method to obtain BinaryTypeImpl here. From what I see call to BinaryContext#metadata goes exactly to cacheObjProc#metadata(int) in the end. If this is true then we don't need metadataProvider parameter at all.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
24 Duplicated Blocks on New Code (required ≤ 10)
310 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@nizhikov nizhikov merged commit 7183a72 into apache:master Sep 24, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants