[GitHub] oignatenko opened a new pull request #5788: IGNITE-10796 Migrate from JUnit 3 to 4 suites involving IgniteTestSuite
oignatenko opened a new pull request #5788: IGNITE-10796 Migrate from JUnit 3 to 4 suites involving IgniteTestSuite URL: https://github.com/apache/ignite/pull/5788 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] zaleslaw opened a new pull request #5787: IGNITE-10713:[ML] Refactor examples with accuracy calculation and another metrics usage
zaleslaw opened a new pull request #5787: IGNITE-10713:[ML] Refactor examples with accuracy calculation and another metrics usage URL: https://github.com/apache/ignite/pull/5787 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] AMashenkov closed pull request #5741: IGNITE-9303: Fix wrong page tag usage.
AMashenkov closed pull request #5741: IGNITE-9303: Fix wrong page tag usage. URL: https://github.com/apache/ignite/pull/5741 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java index 60aefb927ce6..2954d926897e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java @@ -497,7 +497,7 @@ private long allocateDataPage(int part) throws IgniteCheckedException { initIo = ioVersions().latest(); } -else if (PageIdUtils.tag(pageId) != PageIdAllocator.FLAG_DATA) +else if (PageIdUtils.flag(pageId) != PageIdAllocator.FLAG_DATA) pageId = initReusedPage(pageId, row.partition(), statHolder); else pageId = PageIdUtils.changePartitionId(pageId, (row.partition())); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rkondakov opened a new pull request #5786: IGNITE-10753: Improved cleaning old versions in afterTest() with enabled MVCC.
rkondakov opened a new pull request #5786: IGNITE-10753: Improved cleaning old versions in afterTest() with enabled MVCC. URL: https://github.com/apache/ignite/pull/5786 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asfgit closed pull request #5664: IGNITE-5003: Hanging of parallel write for the same key in Cach…
asfgit closed pull request #5664: IGNITE-5003: Hanging of parallel write for the same key in Cach… URL: https://github.com/apache/ignite/pull/5664 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java index 82ff3aaabac2..71b06ab0ba97 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java @@ -439,10 +439,24 @@ public void forceFlush() throws IgniteCheckedException { val.readLock().lock(); try { -if (val.operation() == StoreOperation.PUT) -loaded.put(key, val.entry().getValue()); +StoreOperation op; + +V value; + +if (writeCoalescing && val.nextOperation() != null) { +op = val.nextOperation(); + +value = (op == StoreOperation.PUT) ? val.nextEntry().getValue() : null; +} else { +op = val.operation(); + +value = (op == StoreOperation.PUT) ? val.entry().getValue() : null; +} + +if (op == StoreOperation.PUT) +loaded.put(key, value); else -assert val.operation() == StoreOperation.RMV : val.operation(); +assert op == StoreOperation.RMV : op; } finally { val.readLock().unlock(); @@ -484,9 +498,23 @@ public void forceFlush() throws IgniteCheckedException { val.readLock().lock(); try { -switch (val.operation()) { +StoreOperation op; + +V value; + +if (writeCoalescing && val.nextOperation() != null) { +op = val.nextOperation(); + +value = (op == StoreOperation.PUT) ? val.nextEntry().getValue() : null; +} else { +op = val.operation(); + +value = (op == StoreOperation.PUT) ? val.entry().getValue() : null; +} + +switch (op) { case PUT: -return val.entry().getValue(); +return value; case RMV: return null; @@ -594,11 +622,14 @@ private void putToWriteCache( prev.writeLock().lock(); try { -if (prev.status() == ValueStatus.PENDING) { -// Flush process in progress, try again. -prev.waitForFlush(); +if (prev.status() == ValueStatus.PENDING || prev.status() == ValueStatus.PENDING_AND_UPDATED) { +// Flush process in progress, save next value and update the status. -continue; +prev.setNext(newVal.val, newVal.storeOperation); + +prev.status(ValueStatus.PENDING_AND_UPDATED); + +break; } else if (prev.status() == ValueStatus.FLUSHED) // This entry was deleted from map before we acquired the lock. @@ -713,14 +744,22 @@ private boolean applyBatch(Map> valMap, boolean initSes, Map> batch = U.newLinkedHashMap(valMap.size()); for (Map.Entry> e : valMap.entrySet()) { -if (operation == null) -operation = e.getValue().operation(); +StatefulValue val = e.getValue(); -assert operation == e.getValue().operation(); +val.readLock().lock(); -assert e.getValue().status() == ValueStatus.PENDING; +try { +if (operation == null) +operation = val.operation(); + +assert operation == val.operation(); -batch.put(e.getKey(), e.getValue().entry()); +assert val.status() == ValueStatus.PENDING || val.status() == ValueStatus.PENDING_AND_UPDATED; + +batch.put(e.getKey(), val.entry()); +} finally { +val.readLock().unlock(); +} } boolean result = updateStore(operation, batch, initSes, flusher); @@ -732,17 +771,26 @@ private boolean applyBatch(Map> valMap, boolean initSes, val.writeLock().lock(); try { -
[GitHub] sanpwc opened a new pull request #5785: IGNITE-GG-14588
sanpwc opened a new pull request #5785: IGNITE-GG-14588 URL: https://github.com/apache/ignite/pull/5785 SQL: Accept query cancel object from the outside for GG PE 2.5 implemented. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] tledkov-gridgain opened a new pull request #5784: JDK11: fix check jdk version at the ignite.bat
tledkov-gridgain opened a new pull request #5784: JDK11: fix check jdk version at the ignite.bat URL: https://github.com/apache/ignite/pull/5784 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] antonovsergey93 closed pull request #5576: IGNITE-10507 idle_verify added CRC sum check and collecting exceptions from all nodes
antonovsergey93 closed pull request #5576: IGNITE-10507 idle_verify added CRC sum check and collecting exceptions from all nodes URL: https://github.com/apache/ignite/pull/5576 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java index fbc881949ef0..f779a1ca4296 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/CommandHandler.java @@ -361,6 +361,9 @@ /** */ private static final String CONFIG = "--config"; +/** */ +private static final String IDLE_CHECK_CRC = "--check-crc"; + /** Utility name. */ private static final String UTILITY_NAME = "control.sh"; @@ -1031,7 +1034,10 @@ else if (idleVerifyV2) */ private void legacyCacheIdleVerify(GridClient client, CacheArguments cacheArgs) throws GridClientException { VisorIdleVerifyTaskResult res = executeTask( -client, VisorIdleVerifyTask.class, new VisorIdleVerifyTaskArg(cacheArgs.caches())); +client, +VisorIdleVerifyTask.class, +new VisorIdleVerifyTaskArg(cacheArgs.caches(), cacheArgs.idleCheckCrc()) +); Map> conflicts = res.getConflicts(); @@ -1180,7 +1186,12 @@ private void cacheIdleVerifyDump(GridClient client, CacheArguments cacheArgs) th String path = executeTask( client, VisorIdleVerifyDumpTask.class, -new VisorIdleVerifyDumpTaskArg(cacheArgs.caches(), cacheArgs.isSkipZeros(), cacheArgs.getCacheFilterEnum()) +new VisorIdleVerifyDumpTaskArg( +cacheArgs.caches(), +cacheArgs.idleCheckCrc(), +cacheArgs.isSkipZeros(), +cacheArgs.getCacheFilterEnum() +) ); log("VisorIdleVerifyDumpTask successfully written output to '" + path + "'"); @@ -1192,7 +1203,10 @@ private void cacheIdleVerifyDump(GridClient client, CacheArguments cacheArgs) th */ private void cacheIdleVerifyV2(GridClient client, CacheArguments cacheArgs) throws GridClientException { IdleVerifyResultV2 res = executeTask( -client, VisorIdleVerifyTaskV2.class, new VisorIdleVerifyTaskArg(cacheArgs.caches())); +client, +VisorIdleVerifyTaskV2.class, +new VisorIdleVerifyTaskArg(cacheArgs.caches(), cacheArgs.idleCheckCrc()) +); res.print(System.out::print); } @@ -2127,6 +2141,8 @@ private CacheArguments parseAndValidateCacheArgs() { cacheArgs.dump(true); else if (CMD_SKIP_ZEROS.equals(nextArg)) cacheArgs.skipZeros(true); +else if (IDLE_CHECK_CRC.equals(nextArg)) +cacheArgs.idleCheckCrc(true); else if (CACHE_FILTER.equals(nextArg)) { String filter = nextArg("The cache filter should be specified. The following values can be " + "used: " + Arrays.toString(CacheFilterEnum.values()) + '.'); diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java index 9372391397db..61a1f2e72b7f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheArguments.java @@ -75,6 +75,9 @@ /** Cache filter. */ private CacheFilterEnum cacheFilterEnum = CacheFilterEnum.ALL; +/** Check CRC sum on idle verify. */ +private boolean idleCheckCrc; + /** * @return Gets filter of caches, which will by checked. */ @@ -290,4 +293,15 @@ public void setUserAttributes(Set userAttrs) { * @param outputFormat New output format. */ public void outputFormat(OutputFormat outputFormat) { this.outputFormat = outputFormat; } + +/** + * @return Check page CRC sum on idle verify flag. + */ +public boolean idleCheckCrc() { return idleCheckCrc; } + +/** + * @param idleCheckCrc Check page CRC sum on idle verify flag. + */ +public void idleCheckCrc(boolean idleCheckCrc) { this.idleCheckCrc = idleCheckCrc; } + } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java
[GitHub] alamar commented on a change in pull request #5725: IGNITE-10732 Force -Dfile.encoding=UTF-8
alamar commented on a change in pull request #5725: IGNITE-10732 Force -Dfile.encoding=UTF-8 URL: https://github.com/apache/ignite/pull/5725#discussion_r246328674 ## File path: modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ## @@ -1387,6 +1392,20 @@ private void validateCommon(IgniteConfiguration cfg) { A.ensure(cfg.getNetworkSendRetryCount() > 0, "cfg.getNetworkSendRetryCount() > 0"); } +/** + * Check whether UTF-8 is the default character encoding. + * Differing character encodings across cluster may lead to erratic behavior. + */ +private void checkFileEncoding() { +String encodingDisplayName = Charset.defaultCharset().displayName(Locale.ENGLISH); + +if (!"UTF-8".equals(encodingDisplayName)) { Review comment: Even if encoding is consistent between nodes, it might lead to data corruption when Unicode strings are encoded to 8-bit encoding and then de-encoded. Some characters will turn into ?'s as they're not representable in a given 8-bit charset. Therefore, we should keep the warning. They may still run but they need to be aware. We have quite a few warnings anyway which are printed even with default configuration. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] sk0x50 closed pull request #5776: IGNITE-5003 run all tests
sk0x50 closed pull request #5776: IGNITE-5003 run all tests URL: https://github.com/apache/ignite/pull/5776 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java index fdf3649fbd8f..c64dbc81815a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/store/GridCacheWriteBehindStore.java @@ -439,10 +439,24 @@ public void forceFlush() throws IgniteCheckedException { val.readLock().lock(); try { -if (val.operation() == StoreOperation.PUT) -loaded.put(key, val.entry().getValue()); +StoreOperation op; + +V value; + +if (writeCoalescing && val.nextOperation() != null) { +op = val.nextOperation(); + +value = (op == StoreOperation.PUT) ? val.nextEntry().getValue() : null; +} else { +op = val.operation(); + +value = (op == StoreOperation.PUT) ? val.entry().getValue() : null; +} + +if (op == StoreOperation.PUT) +loaded.put(key, value); else -assert val.operation() == StoreOperation.RMV : val.operation(); +assert op == StoreOperation.RMV : op; } finally { val.readLock().unlock(); @@ -484,9 +498,23 @@ public void forceFlush() throws IgniteCheckedException { val.readLock().lock(); try { -switch (val.operation()) { +StoreOperation op; + +V value; + +if (writeCoalescing && val.nextOperation() != null) { +op = val.nextOperation(); + +value = (op == StoreOperation.PUT) ? val.nextEntry().getValue() : null; +} else { +op = val.operation(); + +value = (op == StoreOperation.PUT) ? val.entry().getValue() : null; +} + +switch (op) { case PUT: -return val.entry().getValue(); +return value; case RMV: return null; @@ -593,11 +621,14 @@ private void putToWriteCache( prev.writeLock().lock(); try { -if (prev.status() == ValueStatus.PENDING) { -// Flush process in progress, try again. -prev.waitForFlush(); +if (prev.status() == ValueStatus.PENDING || prev.status() == ValueStatus.PENDING_AND_UPDATED) { +// Flush process in progress, save next value and update the status. -continue; +prev.setNext(newVal.val, newVal.storeOperation); + +prev.status(ValueStatus.PENDING_AND_UPDATED); + +break; } else if (prev.status() == ValueStatus.FLUSHED) // This entry was deleted from map before we acquired the lock. @@ -712,14 +743,22 @@ private boolean applyBatch(Map> valMap, boolean initSes, Map> batch = U.newLinkedHashMap(valMap.size()); for (Map.Entry> e : valMap.entrySet()) { -if (operation == null) -operation = e.getValue().operation(); +StatefulValue val = e.getValue(); -assert operation == e.getValue().operation(); +val.readLock().lock(); -assert e.getValue().status() == ValueStatus.PENDING; +try { +if (operation == null) +operation = val.operation(); + +assert operation == val.operation(); -batch.put(e.getKey(), e.getValue().entry()); +assert val.status() == ValueStatus.PENDING || val.status() == ValueStatus.PENDING_AND_UPDATED; + +batch.put(e.getKey(), val.entry()); +} finally { +val.readLock().unlock(); +} } boolean result = updateStore(operation, batch, initSes, flusher); @@ -731,17 +770,26 @@ private boolean applyBatch(Map> valMap, boolean initSes, val.writeLock().lock(); try { -