[jira] [Created] (IGNITE-3464) Possible race between partition exchange and prepare/finish requests

2016-07-11 Thread Alexey Goncharuk (JIRA)
Alexey Goncharuk created IGNITE-3464:


 Summary: Possible race between partition exchange and 
prepare/finish requests
 Key: IGNITE-3464
 URL: https://issues.apache.org/jira/browse/IGNITE-3464
 Project: Ignite
  Issue Type: Bug
  Components: cache
Affects Versions: ignite-1.4
Reporter: Alexey Goncharuk


Consider the following scenario:

Two nodes A (coordinator), B. Node C is joining the grid. Current topology 
version is 2.
 - Node A starts a transaction on version 2 and sends a prepare request to node 
B
 - Discovery event happens on node A. Exchange future is created, captures the 
transaction and waits for this transaction to finish.
 - Discovery event happens on node B. Exchange future is created, but since 
there is no transaction on this node (the request has not been processed yet), 
partition release future is completed and exchange waits for an ACK from 
coordinator.
 - Prepare request is processed on node B
 - Node A commits the transaction locally, partition release future is 
completed. Both finish request and exchange message are sent to the node B.
 - Node B processes the exchange message first and completes exchange.
 - Node C starts rebalancing from node B and acquires stale value of the key 
which was supposed to be updated in the transaction.
 - Node B processes finish request and commits the transaction.

As a result, node B and C have different values stored in the cache.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Cache performance for LOCAL mode + setIndexedTypes

2016-07-11 Thread Sergi Vladykin
I guess updating indexes is not free.

Sergi

On Mon, Jul 11, 2016 at 11:48 PM, AndreyVel  wrote:

> Hello, I have created simple test for testing performance put operations
> on single computer,
> can anybody explain why performance for LOCAL mode different for Indexed
> and non Indexed mode?
>
>
>  Cache performance put(Integer, String)/sec: one client and 2
>  remote servers.
>
> CacheMode   TRANSACTIONAL   TRANSACTIONAL
> setIndexedTypes(Integer, String)ATOMIC  ATOMIC
> setIndexedTypes(Integer, String)
> LOCAL   45154   107306  340627  581250
> REPLICATED  3270286572725694
> PARTITIONED 6773540385586714
>
>
> VM options -Xms1g -Xmx1g
> Topology snapshot [ver=5, servers=2, clients=1, CPUs=8, heap=3.0GB]
>
>
> public class CachePerformance {
>
> private static int CACHE_SIZE =100 * 1000;
> private static StringCACHE_NAME ="cachePerf";
>
> public static void main(String[] args) {
> try {
> Ignition.setClientMode(true);
> IgniteConfiguration igniteCfg =new IgniteConfiguration();
> igniteCfg.setPeerClassLoadingEnabled(true);
>
> Ignite ignite = Ignition.start(igniteCfg);
> CachePerformance.execute(ignite);
> }catch (Throwable ex) {
> ex.printStackTrace();
> }
> }
>
> public static void execute(Ignite ignite)throws Exception {
>
> Random rand =new Random();
>
> for (CacheMode cacheMode : CacheMode.values()) {
>
> for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) {
> for (int indexMode =0; indexMode <=1; indexMode++) {
>
> CacheConfiguration cacheCfg =new
> CacheConfiguration<>(CACHE_NAME);
> if (indexMode ==1)
> cacheCfg.setIndexedTypes(Integer.class, String.class);
>
> cacheCfg.setAtomicityMode(atomMode);
> cacheCfg.setCacheMode(cacheMode);
>
> ignite.destroyCache(CACHE_NAME);
> IgniteCache cache =
> ignite.getOrCreateCache(cacheCfg);
> String cacheDesc ="cacheMode=" + cacheMode +", atomMode="
> + atomMode +", indexMode=" + indexMode;
>
> long time = System.nanoTime();
> for (int ind =0; ind  Integer key = rand.nextInt();
> cache.put(key,"=" + ind);
> }
>
> long deltaMs = (System.nanoTime() - time) /100;
> long perfSec = (deltaMs ==0) ?0 :1000 *CACHE_SIZE /
> deltaMs;
> System.out.println(cacheDesc +", Perf/Sec = " + perfSec);
> }
> }
> }
>


Cache performance for LOCAL mode + setIndexedTypes

2016-07-11 Thread AndreyVel
Hello, I have created simple test for testing performance put operations 
on single computer,
can anybody explain why performance for LOCAL mode different for Indexed 
and non Indexed mode?



 Cache performance put(Integer, String)/sec: one client and 2
 remote servers.

CacheMode   TRANSACTIONAL   TRANSACTIONAL
setIndexedTypes(Integer, String)ATOMIC  ATOMIC
setIndexedTypes(Integer, String)
LOCAL   45154   107306  340627  581250
REPLICATED  3270286572725694
PARTITIONED 6773540385586714


VM options -Xms1g -Xmx1g
Topology snapshot [ver=5, servers=2, clients=1, CPUs=8, heap=3.0GB]


public class CachePerformance {

private static int CACHE_SIZE =100 * 1000;
private static StringCACHE_NAME ="cachePerf";

public static void main(String[] args) {
try {
Ignition.setClientMode(true);
IgniteConfiguration igniteCfg =new IgniteConfiguration();
igniteCfg.setPeerClassLoadingEnabled(true);

Ignite ignite = Ignition.start(igniteCfg);
CachePerformance.execute(ignite);
}catch (Throwable ex) {
ex.printStackTrace();
}
}

public static void execute(Ignite ignite)throws Exception {

Random rand =new Random();

for (CacheMode cacheMode : CacheMode.values()) {

for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) {
for (int indexMode =0; indexMode <=1; indexMode++) {

CacheConfiguration cacheCfg =new 
CacheConfiguration<>(CACHE_NAME);
if (indexMode ==1)
cacheCfg.setIndexedTypes(Integer.class, String.class);

cacheCfg.setAtomicityMode(atomMode);
cacheCfg.setCacheMode(cacheMode);

ignite.destroyCache(CACHE_NAME);
IgniteCache cache = 
ignite.getOrCreateCache(cacheCfg);
String cacheDesc ="cacheMode=" + cacheMode +", atomMode=" + atomMode 
+", indexMode=" + indexMode;

long time = System.nanoTime();
for (int ind =0; ind Re: Apache Ignite - New Release

There were also numerous contributions merged with small API improvements.
+1 for making a new release.

Since the changes are mostly bugfixes, should we make it a point release?​


Cache unhandled exception


I have question about https://issues.apache.org/jira/browse/IGNITE-2079

Sametime need send notification for client listener about unhandled 
exception,  what do you think if to add new class CacheExceptionEvent ?

Maybe there is more convenient event type/name ?

Server code
CacheExceptionEvent evt = new CacheExceptionEvent(node, shortMsg, 
ex, EVT_UNHANDLED_EXCEPTION);

ctx.event().record(evt);

Client code example

grid(0).events().localListen(new IgnitePredicate() {
@Override public boolean apply(Event event) {
. . .  return true;
}
}, EventType.EVT_UNHANDLED_EXCEPTION);



Apache Ignite - New Release

Guys,

We have recently found and fixed several issues in the product along with
number of smaller fixes and optimizations and I would like to release these
changes. Issue list follows (complete change list can be obtained via git
log).

ignite-3428 Fixed message recovery handling on reconnect
ignite-3418 Avoid unnecessary discovery messages
IGNITE-2949 - Replaced JCache dependency with Geronimo
ignite-3372: IgniteDataStreamer: pre-loading starvation if multiple
streamers preload the same cache
IGNITE-3305 - Fixed SYNC rebalance mode for dynamically started cache.
+ Lots of changes and fixes for IGFS and Hadoop Accelerator

Does everyone agree this list is worth making new release?

Thanks!

--Yakov


[jira] [Created] (IGNITE-3463) CPP: Add documentation for cross-platform interoperability.

Igor Sapego created IGNITE-3463:
---

 Summary: CPP: Add documentation for cross-platform 
interoperability.
 Key: IGNITE-3463
 URL: https://issues.apache.org/jira/browse/IGNITE-3463
 Project: Ignite
  Issue Type: Sub-task
  Components: documentation
Affects Versions: 1.6
Reporter: Igor Sapego
Assignee: Igor Sapego
 Fix For: 1.7


We need to add separate page at https://apacheignite-cpp.readme.io with notes 
and hints for interoperability between C++ and Java code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (IGNITE-3462) Cache is not empty after destroyCache & createCache in case Swap and EvictionPolicy used

Anton Vinogradov created IGNITE-3462:


 Summary: Cache is not empty after destroyCache & createCache in 
case Swap and EvictionPolicy used
 Key: IGNITE-3462
 URL: https://issues.apache.org/jira/browse/IGNITE-3462
 Project: Ignite
  Issue Type: Bug
Affects Versions: 1.6
Reporter: Anton Vinogradov


See
org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java:282
 for details.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


IGNITE-3055

Igniters,

I have implemented timeout in DataStreamer by issue IGNITE-3055
(*IgniteDataStreamer
can't be timed out*).

That lead the change public API:

1) Added set and get methods (IgniteDataStreamer.timeout(long) and
IgniteDataStreamer.timeout()) for establish. Default value is -1, means
unlimited time.

2) Added new TimeoutException (inherited IgniteException). The exception
will thrown when timeout will be reached (may be take place in
IgniteDataStreamer.addData, IgniteDataStreamer.close and
IgniteDataStreamer.flash operations).

Dmitry, colleagues, please comment or approve.


[GitHub] ignite pull request #866: Ignite 3424

GitHub user AndreyVel opened a pull request:

https://github.com/apache/ignite/pull/866

Ignite 3424

Added unit test IgniteCacheP2pUnmarshallingContinuousQueryErrorTest

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gridgain/apache-ignite ignite-3424

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/866.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #866


commit 9b096ac50c9e31e11aa07e77527291d73604b44b
Author: agura 
Date:   2016-03-17T13:33:17Z

GridCacheOnCopyFlag tests are fixed for binary object marshaller

commit ab8c0dd1990a80f3120be4b6db3aeab3f8aee35b
Author: agura 
Date:   2016-01-18T14:23:47Z

IgniteCacheP2pUnmarshallingQueryErrorTest fixed

commit 9a8cf6223d3901c6d155edb4080d94adc7748da6
Author: agura 
Date:   2016-03-17T14:40:23Z

GridAffinitySelfTest.testAffinity fixed

commit f922840f42736a7c22d4566fd51da4df18be30b3
Author: agura 
Date:   2016-02-29T15:39:45Z

ignite-2734 Binary enum type deserialization from offheap

commit fa356e306e6c8748af1b571427d24e73a12bbd6e
Author: Yakov Zhdanov 
Date:   2016-03-18T13:09:35Z

Added ability to dump comm SPI stats to log.

commit 5be5fa080c7160184c9fbfa9b8b9b748f80c3078
Author: agura 
Date:   2016-03-17T12:18:44Z

ignite-2797 Incorrect timeout calculation for optimistic transactions fixed

commit aafd6f77feb03b1f56efddfbef8f116b65a5ce4e
Author: nikolay_tikhonov 
Date:   2016-03-21T15:52:08Z

Fixed CacheContinuousQueryLostPartitionTest.testAtomicClientEvent test.

commit fca47ec77e4ec6753765e531cd557a279d10d125
Author: Tikhonov Nikolay 
Date:   2016-03-21T20:44:56Z

Fixed IGNITE-2791 "Continuous query listener is not notified during 
concurrent key put and registration."

commit d182da2a6d2821182ae6e636711cd15a44e4ca21
Author: nikolay_tikhonov 
Date:   2016-03-22T11:03:42Z

Fixed TCK tests.

commit f76a3133f40e67621bd4dec54e173f04cbe21485
Author: Yakov Zhdanov 
Date:   2016-03-22T12:58:49Z

Added ability to dump comm SPI recovery descriptors

commit 660aa2f7b3948d34f20baac516d29e43984f4ede
Author: Yakov Zhdanov 
Date:   2016-03-22T14:03:03Z

Added ability to dump direct message reader and writer

commit 3def50cecc70ee45be5d71a7b82c41f9e9e484b4
Author: nikolay_tikhonov 
Date:   2016-03-23T11:03:26Z

Fixed tests.

commit aa8dcd11aa311e6dd639e0a25c5b0eb714e663ad
Author: nikolay_tikhonov 
Date:   2016-03-23T12:47:17Z

Fixed Ignite Client Nodes suite.

commit 4cb994a7253c6b493b4a376ed1489513ecefd8f9
Author: nikolay_tikhonov 
Date:   2016-03-25T08:20:39Z

IGNITE-GG-11048 Fix missed event notification in remove-remove case.

commit 31ae7ea791e258c49f1b25944cba75fd08d0ca49
Author: nikolay_tikhonov 
Date:   2016-03-25T09:37:25Z

Removed isDebug from test.

commit 1c04005c08ae7ca2006d6f2f687a95c2638c73fc
Author: nikolay_tikhonov 
Date:   2016-03-25T12:22:37Z

IGNITE-GG-11048 Added tests.

commit 53a87290fe028e12a81058fc4b2f2f2341395f9a
Author: Tikhonov Nikolay 
Date:   2016-03-25T16:49:31Z

Fixed tests (renamed test methods).

commit ce56625099b5253f8baf27bfbcff4682787a5ee1
Author: Anton Vinogradov 
Date:   2016-03-28T11:13:20Z

Query Suite separation : 1,2,3

commit 08f5981509711e65c0d4c6fc1209068f8958eb06
Author: vozerov-gridgain 
Date:   2016-03-28T09:24:16Z

Support optional IO policy resolver in DataStreamer.

commit 60e74618b310dafc28eb5f935859fed4ec87584c
Author: vozerov-gridgain 
Date:   2016-03-28T11:52:13Z

Merge remote-tracking branch 'upstream/gridgain-7.5.10' into gridgain-7.5.10

commit 9e84e508a394b790ef046cdcf2a015bcf853c064
Author: nikolay_tikhonov 
Date:   2016-03-28T13:59:56Z

Divide test suite.

commit d36a2e51e3aa3105dff73839c84e52a531fbd918
Author: Denis Magda 
Date:   2016-03-24T17:07:48Z

IGNITE-2849: BinaryObjectBuilder doesn't properly check metadata

commit 9e62b667e73396d3affbc4d1e62449d07d08ec8b
Author: Anton Vinogradov 
Date:   2016-03-29T11:56:21Z

 IGNITE-2801 Coordinator floods network with partitions full map exchange 
messages

commit 85a675b7bfbc54745ee9ce95d5786b5bae5be963
Author: iveselovskiy 
Date:   2016-01-18T14:28:42Z

IGNITE-1788: Removed duplicate check of a single invariant from 
IgfsProcessor.  This closes #221.

commit 

Re: ignite-2310

I replied in the ticket.

--Yakov

2016-07-11 12:43 GMT+03:00 Taras Ledkov :

> Hi,
>
> Dmitry, thanks for your comments.
> I've updated the ticket with the reasons of my version of the API changes.
> I'm OK with the both version of the API.
>
> Igniters, please any comments.
>
>
> 09.07.2016 4:22, Dmitriy Setrakyan пишет:
>
> Thanks Taras, I have added my comments in the ticket.
>>
>> On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov 
>> wrote:
>>
>> Igniters,
>>>
>>> The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
>>> with comment
>>> about the changes at the IgniteCompute. Please comment the ticket.
>>>
>>> The changed javadoc of the affinityRun/Call is available to review at the
>>> branch
>>>
>>>
>>> https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123
>>>
>>> 07.07.2016 14:13, Dmitriy Setrakyan пишет:
>>>
>>> Taras, it is very difficult to review API changes this way. Can you
>>> please
>>>
 provide additional APIs in the ticket?

 Also, we should add documentation about reserving partitions as well. To
 my
 knowledge, this feature ensures that a partition will not be migrated
 while
 affinityRun/Call is executed, right?

 On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov 
 wrote:

 Igniters,

> Please take a look at the next proposal of changes at
> IgniteCompute.affinityRun / affinityCall:
>
>
>
>
> https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>
> So, two methods is added affinityRun and affinityCall. There is
> additional
> parameter Collection of extra caches names.
> An affinity job without the extra caches reserves only one partition
> (that
> contains affinity key) of the affinity cache.
> An affinity job with the extra caches parameter reserves the partitions
> (similar to affinity partition) of all extra caches.
>
>
> 06.07.2016 15:18, Semyon Boikov wrote:
>
> I think we should detect such situation and throw exception. As I
>
>> remember
>> for cross cache qieries we throw exception if caches have different
>> partitions distribution.
>>
>> On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov 
>> wrote:
>>
>> Guys, this does not work in general case. If you provide more than one
>>
>> partition you can end up with a situation when they reside on more
>>> than
>>> one
>>> node.
>>>
>>> --Yakov
>>>
>>> 2016-07-06 13:50 GMT+03:00 Vladimir Ozerov :
>>>
>>> If we add "partsToLock" to job execute request, then why we allow it
>>> only
>>>
>>> for "affinity" methods? We can resort to "with" semantics instead:

 IgniteCompute.*withPartitionsToLock*(...).affinityRun();

 On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov 
 wrote:

 Igniters,

 Lets discuss the changes of public API at the IgniteCompute.
> The new methods affinityRun & affinityCall is added by working on
> IGNITE-2310.
>
> https://issues.apache.org/jira/browse/IGNITE-2310
>
> Please take a look at the signature of the new methods:
>
>
>
>
>
>
>>> https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a
>>>
>>> void affinityRun(@Nullable String cacheName, Object affKey,
>>>
 IgniteRunnable

 job, Map partsToLock)

> The parameter Map partsToLock is added.
> Map contains the pairs of the cache name and array of partitions
> that
>
> must
>
 be reserved on the target node before job execution.

> Dmitry, colleagues, please comment or approve.
>
> --
> Taras Ledkov
> Mail-To: tled...@gridgain.com
>
>
>
> --
>
 Taras Ledkov
> Mail-To: tled...@gridgain.com
>
>
>
> --
>>> Taras Ledkov
>>> Mail-To: tled...@gridgain.com
>>>
>>>
>>>
> --
> Taras Ledkov
> Mail-To: tled...@gridgain.com
>
>


[GitHub] ignite pull request #865: Ignite 3413

GitHub user alexpaschenko opened a pull request:

https://github.com/apache/ignite/pull/865

Ignite 3413



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gridgain/apache-ignite ignite-3413

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/865.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #865


commit 4cb994a7253c6b493b4a376ed1489513ecefd8f9
Author: nikolay_tikhonov 
Date:   2016-03-25T08:20:39Z

IGNITE-GG-11048 Fix missed event notification in remove-remove case.

commit 31ae7ea791e258c49f1b25944cba75fd08d0ca49
Author: nikolay_tikhonov 
Date:   2016-03-25T09:37:25Z

Removed isDebug from test.

commit 1c04005c08ae7ca2006d6f2f687a95c2638c73fc
Author: nikolay_tikhonov 
Date:   2016-03-25T12:22:37Z

IGNITE-GG-11048 Added tests.

commit 53a87290fe028e12a81058fc4b2f2f2341395f9a
Author: Tikhonov Nikolay 
Date:   2016-03-25T16:49:31Z

Fixed tests (renamed test methods).

commit ce56625099b5253f8baf27bfbcff4682787a5ee1
Author: Anton Vinogradov 
Date:   2016-03-28T11:13:20Z

Query Suite separation : 1,2,3

commit 08f5981509711e65c0d4c6fc1209068f8958eb06
Author: vozerov-gridgain 
Date:   2016-03-28T09:24:16Z

Support optional IO policy resolver in DataStreamer.

commit 60e74618b310dafc28eb5f935859fed4ec87584c
Author: vozerov-gridgain 
Date:   2016-03-28T11:52:13Z

Merge remote-tracking branch 'upstream/gridgain-7.5.10' into gridgain-7.5.10

commit 9e84e508a394b790ef046cdcf2a015bcf853c064
Author: nikolay_tikhonov 
Date:   2016-03-28T13:59:56Z

Divide test suite.

commit d36a2e51e3aa3105dff73839c84e52a531fbd918
Author: Denis Magda 
Date:   2016-03-24T17:07:48Z

IGNITE-2849: BinaryObjectBuilder doesn't properly check metadata

commit 9e62b667e73396d3affbc4d1e62449d07d08ec8b
Author: Anton Vinogradov 
Date:   2016-03-29T11:56:21Z

 IGNITE-2801 Coordinator floods network with partitions full map exchange 
messages

commit 85a675b7bfbc54745ee9ce95d5786b5bae5be963
Author: iveselovskiy 
Date:   2016-01-18T14:28:42Z

IGNITE-1788: Removed duplicate check of a single invariant from 
IgfsProcessor.  This closes #221.

commit 0e753c38a986cbd46eb24845808ec1d0fc7d1dea
Author: dkarachentsev 
Date:   2016-02-10T09:38:43Z

IGNITE-2575: Added validation of IGFS endpoint port value. This closes #469.

commit 99028b509c736b79faac7fb8104b1bc3cfe30720
Author: vozerov-gridgain 
Date:   2016-03-03T09:56:55Z

IGFS: Minor refactoring.

commit 219238f2793a3f3f9f5705a065c67510c286df1c
Author: vozerov-gridgain 
Date:   2016-03-03T10:25:43Z

IGNITE-2754: IGFS: Created separate processor for listing remove operation.

commit ff5b68ca69050817794ef4b142c955a186e03de9
Author: vozerov-gridgain 
Date:   2016-03-14T07:19:23Z

IGNITE-2781: IGFS: Force "copyOnRead=false" for meta and data caches.

commit 37c4d508c9e40dcba274ae1625d7bf59bfeef144
Author: vozerov-gridgain 
Date:   2016-03-14T08:49:03Z

IGNITE-2810: IGFS: Striped trash directory to reduce contention during 
removals.

commit 54e6991cb1d0b68c4490dede603c9e3ba7cc3b9e
Author: vozerov-gridgain 
Date:   2016-03-14T09:05:39Z

IGNITE-2810: IGFS: Minor correction to IgfsUtils.isRootOrTrashId() method.

commit 8083391be726c2bbc27e018983ca713e4b25e2a2
Author: vozerov-gridgain 
Date:   2016-03-14T10:17:58Z

IGNITE-2814: IGFS: File lock/unlock/reserve operations are no longer 
require put/replace on cache. Thin entry processors are used instead.

commit a7c1f44420ae96f183abc2e17125f0c9aa0775d5
Author: vozerov-gridgain 
Date:   2016-03-14T12:57:28Z

IGNITE-2828: IGFS: Introduced processor for "updateTimes" operation.

commit ba30ddbc599d67f398ffba1263d174f5b58b4b7d
Author: thatcoach 
Date:   2016-03-15T17:46:13Z

IGNITE-2838: IGFS: Opimized format of IgfsListingEntry. Now it contains 
only file ID and boolean flag endicating whether this a directory or file.

commit 4f7e3c1c2e82596a26cec3b3587991ae18078b64
Author: vozerov-gridgain 
Date:   2016-03-16T06:14:49Z

IGNITE-2817: IGFS: Optimized "updateProperties" and several other cache 
operations. Reafactored IgfsMetaManager a bit to simplify work with cache.

commit 3e59321ef0ae1d936d94f8f804db45ceeff55844
Author: vozerov-gridgain 
Date:   2016-03-16T09:31:37Z

IGNITE-2842: IGFS: Optimized create/mkdirs operations with help of entry 
processors.


Re: ignite-2310


Hi,

Dmitry, thanks for your comments.
I've updated the ticket with the reasons of my version of the API changes.
I'm OK with the both version of the API.

Igniters, please any comments.


09.07.2016 4:22, Dmitriy Setrakyan пишет:

Thanks Taras, I have added my comments in the ticket.

On Thu, Jul 7, 2016 at 5:44 AM, Taras Ledkov  wrote:


Igniters,

The issue https://issues.apache.org/jira/browse/IGNITE-2310 is updated
with comment
about the changes at the IgniteCompute. Please comment the ticket.

The changed javadoc of the affinityRun/Call is available to review at the
branch

https://github.com/gridgain/apache-ignite/blob/ignite-2310/modules/core/src/main/java/org/apache/ignite/IgniteCompute.java#L123

07.07.2016 14:13, Dmitriy Setrakyan пишет:

Taras, it is very difficult to review API changes this way. Can you please

provide additional APIs in the ticket?

Also, we should add documentation about reserving partitions as well. To
my
knowledge, this feature ensures that a partition will not be migrated
while
affinityRun/Call is executed, right?

On Thu, Jul 7, 2016 at 3:02 AM, Taras Ledkov 
wrote:

Igniters,

Please take a look at the next proposal of changes at
IgniteCompute.affinityRun / affinityCall:



https://github.com/gridgain/apache-ignite/commit/c57f009c44e07240fc8c8e6feed3271c63f31664#diff-b276b8e6e14915f9e5f2f5daeeddec8a

So, two methods is added affinityRun and affinityCall. There is
additional
parameter Collection of extra caches names.
An affinity job without the extra caches reserves only one partition
(that
contains affinity key) of the affinity cache.
An affinity job with the extra caches parameter reserves the partitions
(similar to affinity partition) of all extra caches.


06.07.2016 15:18, Semyon Boikov wrote:

I think we should detect such situation and throw exception. As I

remember
for cross cache qieries we throw exception if caches have different
partitions distribution.

On Wed, Jul 6, 2016 at 3:14 PM, Yakov Zhdanov 
wrote:

Guys, this does not work in general case. If you provide more than one


partition you can end up with a situation when they reside on more than
one
node.

--Yakov

2016-07-06 13:50 GMT+03:00 Vladimir Ozerov :

If we add "partsToLock" to job execute request, then why we allow it
only


for "affinity" methods? We can resort to "with" semantics instead:

IgniteCompute.*withPartitionsToLock*(...).affinityRun();

On Wed, Jul 6, 2016 at 12:23 PM, Taras Ledkov 
wrote:

Igniters,


Lets discuss the changes of public API at the IgniteCompute.
The new methods affinityRun & affinityCall is added by working on
IGNITE-2310.

https://issues.apache.org/jira/browse/IGNITE-2310

Please take a look at the signature of the new methods:






https://github.com/gridgain/apache-ignite/commit/991fb60f563ee1630152ca0159d04b4969f883bf#diff-b276b8e6e14915f9e5f2f5daeeddec8a

void affinityRun(@Nullable String cacheName, Object affKey,

IgniteRunnable

job, Map partsToLock)

The parameter Map partsToLock is added.
Map contains the pairs of the cache name and array of partitions that

must

be reserved on the target node before job execution.

Dmitry, colleagues, please comment or approve.

--
Taras Ledkov
Mail-To: tled...@gridgain.com



--

Taras Ledkov
Mail-To: tled...@gridgain.com




--
Taras Ledkov
Mail-To: tled...@gridgain.com




--
Taras Ledkov
Mail-To: tled...@gridgain.com