[jira] [Created] (IGNITE-4908) Reentrant lock looks much slower that cache locks.

2017-04-03 Thread Andrew Mashenkov (JIRA)
Andrew Mashenkov created IGNITE-4908:


 Summary: Reentrant lock looks much slower that cache locks.
 Key: IGNITE-4908
 URL: https://issues.apache.org/jira/browse/IGNITE-4908
 Project: Ignite
  Issue Type: Improvement
  Components: data structures
Affects Versions: 1.8
Reporter: Andrew Mashenkov


We should make a benchmark and investigate this issue.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (IGNITE-4907) Excessive service instances can be started with dynamic deployment.

2017-04-03 Thread Andrew Mashenkov (JIRA)
Andrew Mashenkov created IGNITE-4907:


 Summary: Excessive service instances can be started with dynamic 
deployment.
 Key: IGNITE-4907
 URL: https://issues.apache.org/jira/browse/IGNITE-4907
 Project: Ignite
  Issue Type: Bug
  Components: managed services
Affects Versions: 1.9
Reporter: Andrew Mashenkov
 Fix For: 2.0


More than needed service instances can be started when service deployed 
dynamicly. 

For next service configuration all 3 instances will be started even if cluster 
has 2 ignites nodes only:
  cfg.setMaxPerNodeCount(1);
  cfg.setTotalCount(3);




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Fwd: ScanQuery With BinaryObject

2017-04-03 Thread Andrey Mashenkov
Crossposted to dev:

Guys,

ScanQuery filter code (see IgniteBiPredicate implementation below) can be
cached on server side
that can cause unexpected results.
The main point here is server node never restarts while client does it with
filter code changed.

Is it ok?

I try to add *serialVersionUID* and it was useless. The only class renaming
was helpful.


-- Forwarded message --
From: David Li 
Date: Mon, Apr 3, 2017 at 9:24 AM
Subject: Re: ScanQuery With BinaryObject
To: u...@ignite.apache.org


Sorry, please ignore the previous email, it was sent by mistake.

1. I download apache-ignite-fabric-1.9.0-bin.zip, and unzip it.
2. In terminal, I start an ignite instance by *bin/ignite.sh
examples/config/example-ignite.xml*
3. I create a Java application, source code as below:

public static void main(String[] args) {
String ORG_CACHE = "org_cache_remote";
   * Ignition.setClientMode(true);*
Ignite ignite = Ignition.start("example-ignite.xml");
CacheConfiguration orgCacheCfg = new
CacheConfiguration<>(ORG_CACHE);
orgCacheCfg.setIndexedTypes(Long.class, Organization.class);
ignite.destroyCache(ORG_CACHE);
IgniteCache cache = ignite.createCache(orgCacheCfg);
cache.put(1L, new Organization(1L, "org1", true, "jurong east",
""));
cache.put(2L, new Organization(2L, "org2", false, "orchard", ""));
cache.put(3L, new Organization(3L, "org3", true, "jurong west",
""));
cache.put(4L, new Organization(4L, "org4", false, "woodlands", ""));
cache.put(5L, new Organization(5L, "org5", false, "changi", ""));
// cache.put(6L, new Organization(6L, "org6", true, "jurong island",
""));

IgniteCache binaryCache = cache.withKeepBinary();

List> result;

System.out.println("Scan by address");
ScanQuery scanAddress = new ScanQuery<>(
new IgniteBiPredicate() {
@Override
public boolean apply(Long aLong, BinaryObject binaryObject) {
*// first time filter by jurong, got two entries, org1 and
org3*
*// second time filter by changi, got two entries, org1 and
org3*
*// third time filter by changi as well, uncomment org6,
got three entries, org1, org3 and org6*
*return
binaryObject.field("address").startsWith("jurong");*
}
}
);
result = binaryCache.query(scanAddress).getAll();
System.out.println("result: " + result.size());
for (Cache.Entry entry : result) {
System.out.println(entry.getValue().deserialize().toString());
}

ignite.close();
}

Here what I want to do is start a client node, connect to the server node
started in step 2. Then I create a cache, put some data inside,
then try to run a scan query to find entries by its address.
The problem is when I run this program first time, it will return two
entries, their addresses are started with "jurong", which is correct.
When I run the program again, with changed value, eg. "changi", it should
return one entry, somehow, it still return two entries with address started
with "jurong", rather than "changi".
When I uncomment the line of "org6", and run the program again, it will
return three entries, all of their addresses are started with "jurong".

I have no idea what is going on.





-- 
Best regards,
Andrey V. Mashenkov


Re: TC should fail on AssertionError in logs

2017-04-03 Thread Yakov Zhdanov
Change this to RuntimeException. I think it would be fine. Assertion in
logs should mean something terrible from now and on.

--Yakov


Re: one point optimisation

2017-04-03 Thread ALEKSEY KUZNETSOV
I've attached test that prints messages exchange . Which shows us that
there are more messages then you declared in article. Perhaps,
implementation has changed.
I created it on base of IgniteOnePhaseCommitNearSelfTest

пн, 3 апр. 2017 г. в 19:03, Dmitriy Setrakyan :

> Aleksey,
>
> The blog describes the 1-phase commit at a high level, but I am still
> curious about the differences you found. Can you share them here?
>
> D.
>
> On Mon, Apr 3, 2017 at 2:11 AM, ALEKSEY KUZNETSOV <
> alkuznetsov...@gmail.com>
> wrote:
>
> > Regarding IgniteOnePhaseCommitNearSelfTest test , ignite's one phase
> > optimisation works not as you said.
> > I attached picture of message exchange. There are partial prepare phase
> > exists, along with finish phase.
> >
> >
> >
> > пн, 3 апр. 2017 г. в 10:55, Christos Erotocritou  >:
> >
> >> As far as I know a partition is always allocated to a specific node and
> >> does not span nodes. Ignite has default 1024 partitions on start that
> are
> >> split equally across nodes.
> >>
> >> > On 3 Apr 2017, at 08:10, ALEKSEY KUZNETSOV 
> >> wrote:
> >> >
> >> > in ur blog u texted belonging to the same partition is nessesary for 1
> >> > phase commit. But its not guarantee belonging to the same node.
> >> Partition
> >> > may span many nodes
> >> >
> >> > вс, 2 Апр 2017 г., 13:46 ALEKSEY KUZNETSOV  >:
> >> >
> >> >> thank u !
> >> >>
> >> >> пт, 31 Мар 2017 г., 21:06 Denis Magda :
> >> >>
> >> >> Here is a good blog post about 1phase commit impl in Ignite and its
> >> >> advantages:
> >> >>
> >> >> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-
> >> transactions-for.html
> >> >> <
> >> >> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-
> >> transactions-for.html
> >> >>>
> >> >>
> >> >> Took a reference to it from there:
> >> >>
> >> >> https://apacheignite.readme.io/docs/transactions#section-
> >> two-phase-commit-2pc
> >> >> <
> >> >> https://apacheignite.readme.io/docs/transactions#section-
> >> two-phase-commit-2pc
> >> >>>
> >> >>
> >> >> —
> >> >> Denis
> >> >>
> >> >>> On Mar 31, 2017, at 12:27 PM, Dmitriy Setrakyan <
> >> dsetrak...@apache.org>
> >> >> wrote:
> >> >>>
> >> >>> On Fri, Mar 31, 2017 at 9:25 AM, ALEKSEY KUZNETSOV <
> >> >> alkuznetsov...@gmail.com
> >>  wrote:
> >> >>>
> >>  Igniters! What is the point of one phase optimisation?
> >> 
> >> >>>
> >> >>> Performance
> >> >>
> >> >> --
> >> >>
> >> >> *Best Regards,*
> >> >>
> >> >> *Kuznetsov Aleksey*
> >> >>
> >> > --
> >> >
> >> > *Best Regards,*
> >> >
> >> > *Kuznetsov Aleksey*
> >>
> > --
> >
> > *Best Regards,*
> >
> > *Kuznetsov Aleksey*
> >
>
-- 

*Best Regards,*

*Kuznetsov Aleksey*


[GitHub] ignite pull request #1724: IGNITE-3582 CPP: Replaced pointers with reference...

2017-04-03 Thread isapego
GitHub user isapego opened a pull request:

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

IGNITE-3582 CPP: Replaced pointers with references in function signatures 
where it's possible



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

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

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

https://github.com/apache/ignite/pull/1724.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 #1724


commit d729b459c63110b36cf395e858905701e6820875
Author: Igor Sapego 
Date:   2017-04-03T15:09:35Z

IGNITE-3582: Removed IgnireError passing by pointer

commit 1ea13faca27efd9e56ed337ad0bfb109a775924d
Author: Igor Sapego 
Date:   2017-04-03T15:31:36Z

IGNITE-3582: Refactored BinaryMapReader::GetNext




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Adding ML to Ignite, IGNITE-4572

2017-04-03 Thread anantbietec
yeah thats good but GSOC application last till today only so any suggestion
how to write the proposal or what need to be included in the proposal.



--
View this message in context: 
http://apache-ignite-developers.2346864.n4.nabble.com/Adding-ML-to-Ignite-IGNITE-4572-tp13936p16070.html
Sent from the Apache Ignite Developers mailing list archive at Nabble.com.


Re: one point optimisation

2017-04-03 Thread Dmitriy Setrakyan
Aleksey,

The blog describes the 1-phase commit at a high level, but I am still
curious about the differences you found. Can you share them here?

D.

On Mon, Apr 3, 2017 at 2:11 AM, ALEKSEY KUZNETSOV 
wrote:

> Regarding IgniteOnePhaseCommitNearSelfTest test , ignite's one phase
> optimisation works not as you said.
> I attached picture of message exchange. There are partial prepare phase
> exists, along with finish phase.
>
>
>
> пн, 3 апр. 2017 г. в 10:55, Christos Erotocritou :
>
>> As far as I know a partition is always allocated to a specific node and
>> does not span nodes. Ignite has default 1024 partitions on start that are
>> split equally across nodes.
>>
>> > On 3 Apr 2017, at 08:10, ALEKSEY KUZNETSOV 
>> wrote:
>> >
>> > in ur blog u texted belonging to the same partition is nessesary for 1
>> > phase commit. But its not guarantee belonging to the same node.
>> Partition
>> > may span many nodes
>> >
>> > вс, 2 Апр 2017 г., 13:46 ALEKSEY KUZNETSOV :
>> >
>> >> thank u !
>> >>
>> >> пт, 31 Мар 2017 г., 21:06 Denis Magda :
>> >>
>> >> Here is a good blog post about 1phase commit impl in Ignite and its
>> >> advantages:
>> >>
>> >> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-
>> transactions-for.html
>> >> <
>> >> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-
>> transactions-for.html
>> >>>
>> >>
>> >> Took a reference to it from there:
>> >>
>> >> https://apacheignite.readme.io/docs/transactions#section-
>> two-phase-commit-2pc
>> >> <
>> >> https://apacheignite.readme.io/docs/transactions#section-
>> two-phase-commit-2pc
>> >>>
>> >>
>> >> —
>> >> Denis
>> >>
>> >>> On Mar 31, 2017, at 12:27 PM, Dmitriy Setrakyan <
>> dsetrak...@apache.org>
>> >> wrote:
>> >>>
>> >>> On Fri, Mar 31, 2017 at 9:25 AM, ALEKSEY KUZNETSOV <
>> >> alkuznetsov...@gmail.com
>>  wrote:
>> >>>
>>  Igniters! What is the point of one phase optimisation?
>> 
>> >>>
>> >>> Performance
>> >>
>> >> --
>> >>
>> >> *Best Regards,*
>> >>
>> >> *Kuznetsov Aleksey*
>> >>
>> > --
>> >
>> > *Best Regards,*
>> >
>> > *Kuznetsov Aleksey*
>>
> --
>
> *Best Regards,*
>
> *Kuznetsov Aleksey*
>


[GitHub] ignite pull request #1723: ignite-4851 : made GridDhtLocalPartition state ch...

2017-04-03 Thread ilantukh
GitHub user ilantukh opened a pull request:

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

ignite-4851 : made GridDhtLocalPartition state change atomic with size check



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

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

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

https://github.com/apache/ignite/pull/1723.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 #1723


commit 2185adc240f91faa1fec23dc8846f23e15c8098f
Author: sboikov 
Date:   2017-01-11T10:51:23Z

Improved cache.get benchmarks.

commit 12a4af6448d12c27e44370bc40efb3cc02fa1dc7
Author: sboikov 
Date:   2017-01-11T11:32:07Z

Formatting.

commit 2266e2ac3af446ab36c9d646d2b8abde719295e9
Author: Dmitriy Govorukhin 
Date:   2017-01-11T11:39:56Z

Merge branch 'ignite-gg-11414' into ignite-gg-8.0.2.ea2

commit 3f4a2ee58508eb42d8dfff80f3c8b4c6c6c5823a
Author: sboikov 
Date:   2017-01-11T12:14:23Z

Attempt to fix race b/w createPartitionsFullMessage and cache stop.

commit 43eefb0c77f448af9b3634414bef0e97cb2d7838
Author: Dmitriy Govorukhin 
Date:   2017-01-11T12:30:52Z

ignite-gg-8.0.2.ea2 fix 
CacheExpiryTest.iteratorNextShouldCallGetExpiryForAccessedEntry TCK test

commit 949e4c0ac6a9ebea877bbc336e95f5a8a5cc41f9
Author: sboikov 
Date:   2017-01-11T12:54:30Z

Must use finished exchange future to call validateCache.

commit 3443c4e4942f6fb41fc3d7b37a52a7dd0ea5c7a1
Author: sboikov 
Date:   2017-01-11T12:59:11Z

Minor.

commit 79a546a97448aba01c67ef52177e6c293dd3cf74
Author: Alexey Goncharuk 
Date:   2017-01-11T17:26:53Z

Merge branch 'ignite-3477' of 
https://git-wip-us.apache.org/repos/asf/ignite into ignite-gg-8.0.2.ea2

commit f96c59039a8b5f7d2b8e8070fe1ca43183b4eaaf
Author: Dmitriy Govorukhin 
Date:   2017-01-12T09:21:12Z

ignite-gg-8.0.2.e2 mute test, link to issue IGNITE-305

commit 90f846af029bdc8d62b8a176ca9a144dee4c1cec
Author: Alexey Kuznetsov 
Date:   2017-01-12T11:35:04Z

GG-11794 WIP on command-line utility.

commit fbf13d4c8d95462a7f67fe706cb93a6902d4d483
Author: sboikov 
Date:   2017-01-12T13:20:33Z

Fixed query tests.

commit 42c9da6143140ce57cd7895cc039f3f8966b8179
Author: sboikov 
Date:   2017-01-12T13:58:33Z

Added header.

commit 81435cfad1c462eda79e2ed985294828c20984a2
Author: sboikov 
Date:   2017-01-13T09:06:09Z

Merge remote-tracking branch 'remotes/community/ignite-gg-8.0.2.ea2' into 
ignite-3477

commit beb80830c153ec529d082b3588951af43fdcff33
Author: sboikov 
Date:   2017-01-13T09:07:28Z

Enabled tests.

commit 00e88cc938b24d9f3dd13057ec5593fd72cce28e
Author: Dmitriy Govorukhin 
Date:   2017-01-13T09:16:43Z

ignite-gg-8.0.2.ea2 mute tests

commit 2254d37232ea994ff9dd63917cbd9c8c599bbb12
Author: Dmitriy Govorukhin 
Date:   2017-01-13T12:40:26Z

ignite-gg-8.0.2.ea2 fix test, add licenses header, mute metrics test

commit 049247d373d2b0197a36f133b21575462145f635
Author: Alexey Goncharuk 
Date:   2017-01-13T16:06:12Z

Merge remote-tracking branch 'community/ignite-gg-8.0.2.ea2' into 
ignite-gg-8.0.2.ea2

commit e1b84b41bd4ae52631f17f79396d6921385c0dcc
Author: Dmitriy Govorukhin 
Date:   2017-01-13T16:27:47Z

ignite-gg-8.0.2.ea2 fix 
IgniteCacheP2pUnmarshallingErrorTest.testResponseMessageOnUnmarshallingFailed 
and IgniteCacheClientQueryReplicatedNodeRestartSelfTest.testRestarts

commit 5e289d81273f6eeac826e7f6b5c4de7df2d067ff
Author: Alexey Goncharuk 
Date:   2017-01-13T16:43:40Z

Merge branch 'ignite-3477' of 
https://git-wip-us.apache.org/repos/asf/ignite into ignite-gg-8.0.2.ea2

commit 8f69186343dc95aba403e12c8fb7c06a5042916a
Author: Alexey Goncharuk 
Date:   2017-01-13T16:45:07Z

Merge branch 'ignite-gg-8.0.2.ea2' of 
https://github.com/gridgain/apache-ignite into ignite-gg-8.0.2.ea2

commit 166d63713c259f0b5882c41dffd3bf66d47da0fd
Author: Dmitriy Govorukhin 
Date:   2017-01-16T14:38:49Z

ignite-gg-8.0.2.ea2 fix testDuplicatedDiscoveryDataRemoved

commit e9bb1d900f6e65d8371cb32cbb09e79f9ccc8992
Author: Dmitriy Govorukhin 
Date:   2017-01-16T15:27:51Z

ignite-gg-8.0.2.ea2 mute tests, link to task

commit 6e5bfea3b71068bc4c4487e68d1d9ced4069005a
Author: Dmitriy Govorukhin 
Date:   2017-01-16T18:09:04Z

ignite-gg-8.0.2.ea2 fix query test

commit 

[jira] [Created] (IGNITE-4906) .NET: Examples tests hang

2017-04-03 Thread Pavel Tupitsyn (JIRA)
Pavel Tupitsyn created IGNITE-4906:
--

 Summary: .NET: Examples tests hang
 Key: IGNITE-4906
 URL: https://issues.apache.org/jira/browse/IGNITE-4906
 Project: Ignite
  Issue Type: Bug
  Components: platforms
Affects Versions: 2.0
Reporter: Pavel Tupitsyn
Assignee: Pavel Tupitsyn
 Fix For: 2.0


{{ExamplesTest}} hangs on various stages: 
http://195.239.208.174/viewType.html?buildTypeId=IgniteTests_IgnitePlatformNetLongRunnin

Logs show many multicast-related exceptions. We should probably avoid multicast 
in tests.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] ignite pull request #1722: IGNITE-4905 DML benchmarks ClassCastException fix

2017-04-03 Thread alexpaschenko
GitHub user alexpaschenko opened a pull request:

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

IGNITE-4905 DML benchmarks ClassCastException fix



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

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

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

https://github.com/apache/ignite/pull/1722.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 #1722


commit bae83e6c8700059dda16abc74d70514a655ea8d4
Author: Alexander Paschenko 
Date:   2017-04-03T14:54:10Z

IGNITE-4905 DML benchmarks ClassCastException fix




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (IGNITE-4905) ClassCastException in DML benchmarks

2017-04-03 Thread Alexander Paschenko (JIRA)
Alexander Paschenko created IGNITE-4905:
---

 Summary: ClassCastException in DML benchmarks
 Key: IGNITE-4905
 URL: https://issues.apache.org/jira/browse/IGNITE-4905
 Project: Ignite
  Issue Type: Bug
  Components: SQL
Affects Versions: 1.9
Reporter: Alexander Paschenko
Assignee: Alexander Paschenko
 Fix For: 2.0






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


Re: IGNITE - 4760 : working in hibernate module

2017-04-03 Thread Вадим Опольский
Hello everyone!

I added some change to method threadLocalForCache  and added test
testEntityCacheNonStrictFails.

How to reproduce situation when updates can be recorded to another region?

https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateRegionFactory.java

https://github.com/vadopolski/ignite/blob/5aa25f3830fef14ac507ed73872d62b2969a7411/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/HibernateL2CacheConfigurationSelfTest.java

PullRequest
https://github.com/vadopolski/ignite/pull/4/files

Vadim



2017-03-27 18:20 GMT+03:00 Denis Magda :

> Vadim,
>
> What IDE do you use? My recommendation would be to set up everything let’s
> say under IntellijIDEA or Eclipse and after that trying to compile from a
> terminal.
>
> This is how you can easily prepare the dev env in IntellijIDEA:
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup <
> https://cwiki.apache.org/confluence/display/IGNITE/Project+Setup>
>
> —
> Denis
>
> > On Mar 27, 2017, at 7:14 AM, Вадим Опольский 
> wrote:
> >
> > Valentin, OK.
> >
> > To enabled it in my environment I done next:
> > - built project with command - mvn clean package -DskipTests
> -Prelease,lgpl
> > - added folder hibernate to modules in project structure
> > - added library to dependencies (without it import doesn't working)
> >
> > After that I have a lot of error, for instance:
> > - Class 'AccessStrategy' must either be declared abstract or implement
> abstract method 'remove(SharedSessionContractImplementor, Object) in
> 'RegionAccessStrategy'
> >
> > generateCacheKey
> > getCacheKeyId
> > getRegion
> > insert
> > afterInsert
> > update
> > afterUpdate
> > insert
> > afterInsert
> > update
> > get
> > putFromLoad
> > lockItem
> > unlockItem
> > remove
> >
> > Do anybody know the easier way to resolve this issue?
> >
> > Also tried to reimport all maven projects and cleansed repository in .m2.
> > Vadim Opolski
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 2017-03-25 2:42 GMT+03:00 Valentin Kulichenko <
> valentin.kuliche...@gmail.com >:
> > Vadim,
> >
> > ignite-hibernate module is a part of 'lgpl' profile. Apparently it's not
> > enabled in your environment.
> >
> > -Val
> >
> > On Fri, Mar 24, 2017 at 4:38 PM, Вадим Опольский  >
> > wrote:
> >
> > > Hello everybody,
> > >
> > > I want to resolve issue №4760
> > > https://issues.apache.org/jira/browse/IGNITE-4760 <
> https://issues.apache.org/jira/browse/IGNITE-4760>
> > >
> > > To find solution I'm going to change method threadLocalForCache and to
> add
> > > Junit test.
> > >
> > > Why folder hibernate is not a module ? Can I added it ?
> > >
> > > Vadim Opolski
> > >
> >
>
>


[GitHub] ignite pull request #1721: Ignite 4477 Fix IgniteFuture.listen() and IgniteF...

2017-04-03 Thread dkarachentsev
GitHub user dkarachentsev opened a pull request:

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

Ignite 4477 Fix IgniteFuture.listen() and IgniteFuture.chain() semantics

PR to master

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

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

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

https://github.com/apache/ignite/pull/1721.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 #1721


commit fe71de53fd56b81a22e4b9bbf7d91c4ec2e5589b
Author: dkarachentsev 
Date:   2017-03-31T11:38:55Z

IGNITE-4477 - Fix IgniteFuture.listen() and IgniteFuture.chain() semantics

(cherry picked from commit 3536631)

commit f92932deb50c3eb5c970b5bae9093eb9199539fe
Author: dkarachentsev 
Date:   2017-03-31T13:37:20Z

IGNITE-4477 - Added serial version UID

(cherry picked from commit f46813e)

commit 754d700a3a565e446524a5fc1249edc0bf482eee
Author: dkarachentsev 
Date:   2017-04-03T09:15:46Z

IGNITE-4477 - Add async methods

(cherry picked from commit 34cefed)

commit 12d95e8d32a16e7d8209618f65362428ccf3879e
Author: dkarachentsev 
Date:   2017-03-31T11:41:19Z

IGNITE-4477 - Adopt to master




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Support for starting transaction in another thread

2017-04-03 Thread ALEKSEY KUZNETSOV
Hi, Igniters! This is a subtask for "distributed transaction of non-single
coordinator" task.
Will appreciate your thoughts on it.
ticket : https://issues.apache.org/jira/browse/IGNITE-4887
and a commit :
https://github.com/voipp/ignite/commit/aa3487bd9c203394f534c605f84e06436b638e5c
-- 

*Best Regards,*

*Kuznetsov Aleksey*


IGNITE-4188: Savepoints support inside of Ignite Transactions, thoughts about realisation

2017-04-03 Thread Дмитрий Рябов
Hello, community. Sam, Yakov, Alex G., can you look my decision?

try (Transaction tx = ignite.transactions().txStart()) {
c.put(1, 1);

tx.savepoint("mysavepoint");

c.put(2, 2);

tx.rollbackToSavepoint("mysavepoint");

c.put(3, 3);

tx.commit();
}


I want to make it in such way:

When user calls tx.savepoint(""), Transaction delegate call to
IgniteInternalTx, which delegate it to its IgniteTxState.

IgniteTxState implementation will contain stack of savepoints, where
Savepoint is class containing snapshot of cache entries and any important
additional information.

What do you think?


Re: TC should fail on AssertionError in logs

2017-04-03 Thread Anton Vinogradov
Yakov,

I found following at first opened suite logs (Basic)

1) [INFO ][test-runner-#4966%future.GridEmbeddedFutureSelfTest%][root]
Failed with unhandled error (normal behaviour): java.lang.AssertionError:
Test assertion (should be ignored).
2) [INFO ][test-runner-#4883%lang.GridByteArrayListSelfTest%][root] Caught
expected error: java.lang.AssertionError

Not sure we can just fail in case "AssertionError" found.

On Fri, Mar 31, 2017 at 1:02 PM, Yakov Zhdanov  wrote:

> Guys, I see couple of tests which have assertion error in some background
> Ignite threads that may not cause test to fail.
>
> https://issues.apache.org/jira/browse/IGNITE-4895
>
> Anton V, can you please take a look?
>
> --Yakov
>


Re: one point optimisation

2017-04-03 Thread ALEKSEY KUZNETSOV
Regarding IgniteOnePhaseCommitNearSelfTest test , ignite's one phase
optimisation works not as you said.
I attached picture of message exchange. There are partial prepare phase
exists, along with finish phase.



пн, 3 апр. 2017 г. в 10:55, Christos Erotocritou :

> As far as I know a partition is always allocated to a specific node and
> does not span nodes. Ignite has default 1024 partitions on start that are
> split equally across nodes.
>
> > On 3 Apr 2017, at 08:10, ALEKSEY KUZNETSOV 
> wrote:
> >
> > in ur blog u texted belonging to the same partition is nessesary for 1
> > phase commit. But its not guarantee belonging to the same node. Partition
> > may span many nodes
> >
> > вс, 2 Апр 2017 г., 13:46 ALEKSEY KUZNETSOV :
> >
> >> thank u !
> >>
> >> пт, 31 Мар 2017 г., 21:06 Denis Magda :
> >>
> >> Here is a good blog post about 1phase commit impl in Ignite and its
> >> advantages:
> >>
> >>
> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
> >> <
> >>
> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
> >>>
> >>
> >> Took a reference to it from there:
> >>
> >>
> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
> >> <
> >>
> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
> >>>
> >>
> >> —
> >> Denis
> >>
> >>> On Mar 31, 2017, at 12:27 PM, Dmitriy Setrakyan  >
> >> wrote:
> >>>
> >>> On Fri, Mar 31, 2017 at 9:25 AM, ALEKSEY KUZNETSOV <
> >> alkuznetsov...@gmail.com
>  wrote:
> >>>
>  Igniters! What is the point of one phase optimisation?
> 
> >>>
> >>> Performance
> >>
> >> --
> >>
> >> *Best Regards,*
> >>
> >> *Kuznetsov Aleksey*
> >>
> > --
> >
> > *Best Regards,*
> >
> > *Kuznetsov Aleksey*
>
-- 

*Best Regards,*

*Kuznetsov Aleksey*


Re: [jira] [Comment Edited] (IGNITE-4052) Add ability to set up users for MESOS

2017-04-03 Thread Вадим Опольский
Hello everybody!

Nikolay, I didn't have experience with ignite-yarn integration and didn't
have idea how fix it, but its interesting for me. Can you write name of
another java application, in which I can see how they connect to mesos.

Also, can you write how correctly to test working of Builder#setRoleBytes
and Builder#setUserBytes without library org.junit.Rule and
org.junit.contrib.java.lang.system.EnvironmentVariables.

Vadim

2017-03-31 18:07 GMT+03:00 Nikolay Tikhonov (JIRA) :

>
> [ https://issues.apache.org/jira/browse/IGNITE-4052?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel=15951002#comment-15951002 ]
>
> Nikolay Tikhonov edited comment on IGNITE-4052 at 3/31/17 3:06 PM:
> ---
>
> [~javaller]
> I'm some bit confused. Builder#setRoleBytes and Builder#setUserBytes
> methods used only test and how user can provide this parameters in
> ignite-yarn integration? Also seems that the test does test nothing. I
> don't see any invocation "production code" from {{IgniteFrameworkInfoTest}}
> test. Do you have any idea how fix it?
> I think that need to investigate this deeper and look at another mesos
> application and see how they do it.
>
>
> was (Author: ntikhonov):
> [~javaller]
> I'm some bit confused. Builder#setRoleBytes and Builder#setUserBytes
> methods used only test and how user can provide this parameters in
> ignite-yarn integration? Also seems that test does test nothing. I don't
> see any invocation "production code" from {{IgniteFrameworkInfoTest}} test.
> Do you have any idea how fix it?
> I think that need to investigate this deeper and look at another mesos
> application and see how they do it.
>
> > Add ability to set up users for MESOS
> > -
> >
> > Key: IGNITE-4052
> > URL: https://issues.apache.org/jira/browse/IGNITE-4052
> > Project: Ignite
> >  Issue Type: Improvement
> >  Components: general
> >Affects Versions: 1.7
> >Reporter: Nikolay Tikhonov
> >Assignee: Vadim Opolski
> >Priority: Trivial
> >
> > In current implementation Ignite Mesos Framework connects to MESOS
> cluster via current user. Need to add ability to configure this parameters
> via system env properties. Also need to add properties for mesos role.
> > See org/apache/ignite/mesos/IgniteFramework.java:537
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.3.15#6346)
>


[GitHub] ignite pull request #1613: IGNITE-4815: CollisionSPI.onCollision() confusing...

2017-04-03 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] ignite pull request #1610: Ignite 4813

2017-04-03 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: one point optimisation

2017-04-03 Thread Christos Erotocritou
As far as I know a partition is always allocated to a specific node and does 
not span nodes. Ignite has default 1024 partitions on start that are split 
equally across nodes. 

> On 3 Apr 2017, at 08:10, ALEKSEY KUZNETSOV  wrote:
> 
> in ur blog u texted belonging to the same partition is nessesary for 1
> phase commit. But its not guarantee belonging to the same node. Partition
> may span many nodes
> 
> вс, 2 Апр 2017 г., 13:46 ALEKSEY KUZNETSOV :
> 
>> thank u !
>> 
>> пт, 31 Мар 2017 г., 21:06 Denis Magda :
>> 
>> Here is a good blog post about 1phase commit impl in Ignite and its
>> advantages:
>> 
>> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
>> <
>> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
>>> 
>> 
>> Took a reference to it from there:
>> 
>> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
>> <
>> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
>>> 
>> 
>> —
>> Denis
>> 
>>> On Mar 31, 2017, at 12:27 PM, Dmitriy Setrakyan 
>> wrote:
>>> 
>>> On Fri, Mar 31, 2017 at 9:25 AM, ALEKSEY KUZNETSOV <
>> alkuznetsov...@gmail.com
 wrote:
>>> 
 Igniters! What is the point of one phase optimisation?
 
>>> 
>>> Performance
>> 
>> --
>> 
>> *Best Regards,*
>> 
>> *Kuznetsov Aleksey*
>> 
> -- 
> 
> *Best Regards,*
> 
> *Kuznetsov Aleksey*


Re: one point optimisation

2017-04-03 Thread ALEKSEY KUZNETSOV
in ur blog u texted belonging to the same partition is nessesary for 1
phase commit. But its not guarantee belonging to the same node. Partition
may span many nodes

вс, 2 Апр 2017 г., 13:46 ALEKSEY KUZNETSOV :

> thank u !
>
> пт, 31 Мар 2017 г., 21:06 Denis Magda :
>
> Here is a good blog post about 1phase commit impl in Ignite and its
> advantages:
>
> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
> <
> http://gridgain.blogspot.com/2014/09/one-phase-commit-fast-transactions-for.html
> >
>
> Took a reference to it from there:
>
> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
> <
> https://apacheignite.readme.io/docs/transactions#section-two-phase-commit-2pc
> >
>
> —
> Denis
>
> > On Mar 31, 2017, at 12:27 PM, Dmitriy Setrakyan 
> wrote:
> >
> > On Fri, Mar 31, 2017 at 9:25 AM, ALEKSEY KUZNETSOV <
> alkuznetsov...@gmail.com
> >> wrote:
> >
> >> Igniters! What is the point of one phase optimisation?
> >>
> >
> > Performance
>
> --
>
> *Best Regards,*
>
> *Kuznetsov Aleksey*
>
-- 

*Best Regards,*

*Kuznetsov Aleksey*


Re: distributed transaction of non-single coordinator

2017-04-03 Thread ALEKSEY KUZNETSOV
so what do u think on my idea?

пт, 31 Мар 2017 г., 11:05 ALEKSEY KUZNETSOV :

> sorry for misleading you. We planned to support multi-node transactions,
> but failed.
>
> пт, 31 мар. 2017 г. в 10:51, Alexey Goncharuk  >:
>
> Well, now the scenario is more clear, but it has nothing to do with
> multiple coordinators :) Let me think a little bit about it.
>
> 2017-03-31 9:53 GMT+03:00 ALEKSEY KUZNETSOV :
>
> > so what do u think on the issue ?
> >
> > чт, 30 Мар 2017 г., 17:49 ALEKSEY KUZNETSOV :
> >
> > > Hi ! Thanks for help. I've created ticket :
> > > https://issues.apache.org/jira/browse/IGNITE-4887
> > > and a commit :
> > > https://github.com/voipp/ignite/commit/aa3487bd9c203394f534c605f84e06
> > 436b638e5c
> > > We really need this feature
> > >
> > > чт, 30 мар. 2017 г. в 11:31, Alexey Goncharuk <
> > alexey.goncha...@gmail.com
> > > >:
> > >
> > > Aleksey,
> > >
> > > I doubt your approach works as expected. Current transaction recovery
> > > protocol heavily relies on the originating node ID in its internal
> logic.
> > > For example, currently a transaction will be rolled back if you want to
> > > transfer a transaction ownership to another node and original tx owner
> > > fails. An attempt to commit such a transaction on another node may fail
> > > with all sorts of assertions. After transaction ownership changed, you
> > need
> > > to notify all current transaction participants about this change, and
> it
> > > should also be done failover-safe, let alone that you did not add any
> > tests
> > > for these cases.
> > >
> > > I back Denis here. Please create a ticket first and come up with clear
> > > use-cases, API and protocol changes design. It is hard to reason about
> > the
> > > changes you've made when we do not even understand why you are making
> > these
> > > changes and how they are supposed to work.
> > >
> > > --AG
> > >
> > > 2017-03-30 10:43 GMT+03:00 ALEKSEY KUZNETSOV  >:
> > >
> > > > So, what do u think on my idea ?
> > > >
> > > > ср, 29 мар. 2017 г. в 10:35, ALEKSEY KUZNETSOV <
> > alkuznetsov...@gmail.com
> > > >:
> > > >
> > > > > Hi! No, i dont have ticket for this.
> > > > > In the ticket i have implemented methods that change transaction
> > status
> > > > to
> > > > > STOP, thus letting it to commit transaction in another thread. In
> > > another
> > > > > thread you r going to restart transaction in order to commit it.
> > > > > The mechanism behind it is obvious : we change thread id to newer
> one
> > > in
> > > > > ThreadMap, and make use of serialization of txState, transactions
> > > itself
> > > > to
> > > > > transfer them into another thread.
> > > > >
> > > > >
> > > > > вт, 28 мар. 2017 г. в 20:15, Denis Magda :
> > > > >
> > > > > Aleksey,
> > > > >
> > > > > Do you have a ticket for this? Could you briefly list what exactly
> > was
> > > > > done and how the things work.
> > > > >
> > > > > —
> > > > > Denis
> > > > >
> > > > > > On Mar 28, 2017, at 8:32 AM, ALEKSEY KUZNETSOV <
> > > > alkuznetsov...@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > Hi, Igniters! I 've made implementation of transactions of
> > non-single
> > > > > > coordinator. Here you can start transaction in one thread and
> > commit
> > > it
> > > > > in
> > > > > > another thread.
> > > > > > Take a look on it. Give your thoughts on it.
> > > > > >
> > > > > >
> > > > > https://github.com/voipp/ignite/pull/10/commits/
> > > > 3a3d90aa6ac84f125e4c3ce4ced4f269a695ef45
> > > > > >
> > > > > > пт, 17 мар. 2017 г. в 19:26, Sergi Vladykin <
> > > sergi.vlady...@gmail.com
> > > > >:
> > > > > >
> > > > > >> You know better, go ahead! :)
> > > > > >>
> > > > > >> Sergi
> > > > > >>
> > > > > >> 2017-03-17 16:16 GMT+03:00 ALEKSEY KUZNETSOV <
> > > > alkuznetsov...@gmail.com
> > > > > >:
> > > > > >>
> > > > > >>> we've discovered several problems regarding your "accumulation"
> > > > > >>> approach.These are
> > > > > >>>
> > > > > >>>   1. perfomance issues when transfering data from temporary
> cache
> > > to
> > > > > >>>   permanent one. Keep in mind big deal of concurent
> transactions
> > in
> > > > > >>> Service
> > > > > >>>   commiter
> > > > > >>>   2. extreme memory load when keeping temporary cache in memory
> > > > > >>>   3. As long as user is not acquainted with ignite, working
> with
> > > > cache
> > > > > >>>   must be transparent for him. Keep this in mind. User's node
> can
> > > > > >> evaluate
> > > > > >>>   logic with no transaction at all, so we should deal with both
> > > types
> > > > > of
> > > > > >>>   execution flow : transactional and non-transactional.Another
> > one
> > > > > >>> problem is
> > > > > >>>   transaction id support at the user node. We would have
> handled
> > > all
> > > > > >> this
> > > > > >>>   issues and many more.
> > > > > >>>   4. we cannot pessimistically lock entity.
> > > > > >>>