Skip to content
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

gg-21461 #180

Open
wants to merge 63 commits into
base: ignite-2.5-master
Choose a base branch
from
Open

gg-21461 #180

wants to merge 63 commits into from

Conversation

ygerzhedovich
Copy link

gg-21461

antkr and others added 30 commits July 1, 2019 21:56
…er doesn't configured explicitly.

(cherry picked from commit c8bd480)
(cherry-picked from commit #fa8e5da60546bf2e46cc16b13baf0a21c394e7b6)
(cherry picked from commit cafab0d)

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtPartitionTopologyImpl.java
#	modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsCacheWalDisabledOnRebalancingTest.java
…ence.GridCacheOffheapManager#restorePartitionStates method.

(cherry picked from commit 621f6af)
…ame make DR paused in case of persistence.

(cherry picked from commit e093716)
…e same name make DR paused in case of persistence."

This reverts commit 3616b6a.
…Left flaky failed on TC

(cherry picked from commit fe0ec74)
…ctivateSimple_5_Servers_5_Clients_FromClient flaky failed on TC

(cherry picked from commit 2578931)
…ormation about cache group.

(cherry picked from commit 82409a9)
… ignite system properties

(cherry picked from commit 05cdf46)
…ientInForceServerModeStopsOnExchangeHistoryExhaustion is flaky.
… from 8.4.9 to 8.5.7 if POJO primary key is used
pavlukhin and others added 19 commits July 16, 2019 14:54
…emote filter class is missing (#177)

(cherry picked from commit a28138f)
…message, if applicable.

(cherry picked from commit 4b045f5)
…about group and cache id.

(cherry picked from commit f3017ea)
…ce.file.FilePageStore instances

(cherry picked from commit 806b1b6)
…p for experemental commands.

(cherry picked from commit 86ee0b5)
…pi without IgniteConfiguration.setIncludeEventTypes(EventType.EVT_TASK_FINISHED, EventType.EVT_TASK_FAILED) leads to memory leak - Fixed apache#6690. (apache#293)

(cherry picked from commit e2d6632)
byte[] originalObjBytes = val.getBytesNoCopy();

// read size more then available space or more then origin length
if(len > inlineSize - fieldOff - 3 || len > originalObjBytes.length){

Choose a reason for hiding this comment

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

len > originalObjBytes.length seems to mean unexpected (garbage) data in current position. Cannot we do comparison in branch if (type == Value.JAVA_OBJECT) using following strategy:

  1. Prepare (virtually) an expected byte content which is saved by regular inline procedures.
  2. Compare that content with bytes stored in the index page.
  3. Exact match means that JAVA_OBJECT inline is (almost 100%) supported. Otherwise it is not (tree corruption is possible, might be warning is a good idea). In both cases we can finish tree scan here.

Also using of InlineIndexHelper.compare is dangerous below, because it is more broad method and it is used in different places. But here we are just solving a compatibility issue from certain point in history.

Copy link
Author

Choose a reason for hiding this comment

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

for your comparison proposal - by fact it do the same way.

objections to use InlineIndexHelper.compare don't understand. Let's discuss internally.

@@ -148,7 +167,9 @@ protected H2Tree(
if (metaInfo.useUnwrappedPk())
throw new IgniteCheckedException("Unwrapped PK is not supported by current version");

this.inlineSize = metaInfo.inlineSize();
inlineSize = metaInfo.inlineSize();

Choose a reason for hiding this comment

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

For my understanding. How is it possible that inlineSize passed to a constructor is not equal to metaInfo.inlineSize()?

Copy link
Author

Choose a reason for hiding this comment

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

inlinesize can be different due to use different set of columns to calculate it ( as example before support JAVA_OBJECT type and after)

Choose a reason for hiding this comment

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

Where do we calculate it?

Copy link
Author

Choose a reason for hiding this comment

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

@pavlukhin see org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex#computeInlineSize

for (InlineIndexHelper ih : inlineHelpers) {
if (fieldOff >= inlineSize)
return false;

if (ih.type() != Value.JAVA_OBJECT) {
if(ih.size() < 0)

Choose a reason for hiding this comment

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

Formatting.

Copy link
Author

Choose a reason for hiding this comment

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

yep

byte[] inlineBytes = PageUtils.getBytes(pageAddr, off + fieldOff + 3, len);

for (int i = 0; i < len; i++) {
if (inlineBytes[i] == originalObjBytes[i])

Choose a reason for hiding this comment

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

Seems more straightforward to me:

for (int i = 0; i < len; i++) {
    if (inlineBytes[i] != originalObjBytes[i]) {
        inlineObjectSupportedDecision(false, i + " byte compare");

        return true;
    }
}

Copy link
Author

Choose a reason for hiding this comment

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

agree

for (InlineIndexHelper ih : inlineHelpers) {
if (fieldOff >= inlineSize)
return false;

if (ih.type() != Value.JAVA_OBJECT) {
if(ih.size() < 0)
varLenPresents=true;

Choose a reason for hiding this comment

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

I suppose we can initialize it constructor.

Copy link
Author

Choose a reason for hiding this comment

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

yes, but no reason to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet