[jira] [Created] (IGNITE-8715) Problems with Closeable objects from Factory

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8715:
---

 Summary: Problems with Closeable objects from Factory
 Key: IGNITE-8715
 URL: https://issues.apache.org/jira/browse/IGNITE-8715
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov


According to spec Cache#close() should clean up all Closeable objects 
(CacheLoader, CacheWriter, CacheEntryListener, ExpiryPolicy) created by 
factories.
And in TCK 1.0.1 there are no such tests. But in TCK 1.1.0 there are checks for 
it. And Ignite fails it because hasn't such functionality.

So this task about improvement.

Please see links for details.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8714) CacheEntryEvent.getOldValue should be available

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8714:
---

 Summary: CacheEntryEvent.getOldValue should be available
 Key: IGNITE-8714
 URL: https://issues.apache.org/jira/browse/IGNITE-8714
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov


JCache TCK 1.1.0 now tests CacheEntryEvent#getOldValue() behavior.

And current master fails with this reason on following tests:
 * CacheListenerTest.testFilteredListener
 * CacheListenerTest.testCacheEntryListener

In some cases when old value should be available it's not.

Looks like a bug.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8709) CacheMBStatisticsBeanTest.testPutIfAbsent failed

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8709:
---

 Summary: CacheMBStatisticsBeanTest.testPutIfAbsent failed
 Key: IGNITE-8709
 URL: https://issues.apache.org/jira/browse/IGNITE-8709
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov


Now Cache#putIfAbsent should change hit/miss statistic.

But test in TCK 1.0.1 was incorrect.

*So we can't make this test pass in both versions of TCK.*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8708) CacheManagerTest.close_cachesEmpty failed

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8708:
---

 Summary: CacheManagerTest.close_cachesEmpty failed
 Key: IGNITE-8708
 URL: https://issues.apache.org/jira/browse/IGNITE-8708
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov


Method {{CacheManager#getCacheNames()}} should throw {{IllegalStateException}} 
in case when {{CacheManager}} is closed. But in TCK 1.0.1 test 
{{CacheManagerTest.close_cachesEmpty}} expect empty list, which was incorrect 
according to spec.
In TCK 1.1.0 test is fixed.
It was known problem, please see comments in {{CacheManager#getCacheNames()}} 
on current master.
*But we can't make this test pass in both versions of TCK.*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8705) CacheMBStatisticsBeanTest.testClear failed

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8705:
---

 Summary: CacheMBStatisticsBeanTest.testClear failed
 Key: IGNITE-8705
 URL: https://issues.apache.org/jira/browse/IGNITE-8705
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov


JCache TCK 1.1 now have test for CacheClusterMetricsMXBeanImpl#clear(), but we 
currently throw UnsupportedOperationException.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8704) CacheManagerTest.getUnsafeTypedCacheRequest failed

2018-06-05 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8704:
---

 Summary: CacheManagerTest.getUnsafeTypedCacheRequest failed
 Key: IGNITE-8704
 URL: https://issues.apache.org/jira/browse/IGNITE-8704
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov


In JCache 1.1 type safety guarantees on method CacheManager#getCache(String) 
was relaxed. So we can remove unnesesary checks. Please see the links for 
detailes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8687) Add JCache TCK 1.1.0 to TC

2018-06-04 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8687:
---

 Summary: Add JCache TCK 1.1.0 to TC
 Key: IGNITE-8687
 URL: https://issues.apache.org/jira/browse/IGNITE-8687
 Project: Ignite
  Issue Type: Sub-task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov


We need to add a new profile for run TCK 1.1.0 and add it to TC.

Until Ignite becomes JCache 1.1.0 compatible, this profile should coexist with 
TCK 1.0.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-8054) Let serialize only valuable part of GridLongList

2018-03-27 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-8054:
---

 Summary: Let serialize only valuable part of GridLongList
 Key: IGNITE-8054
 URL: https://issues.apache.org/jira/browse/IGNITE-8054
 Project: Ignite
  Issue Type: Bug
  Components: messaging
Affects Versions: 2.4
Reporter: Alexander Menshikov
 Fix For: 2.5


Here in GridLongList we serialize all elements and don't take into account 
`idx` value:


{code:java}
@Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) { 

    writer.setBuffer(buf); 

  

    if (!writer.isHeaderWritten()) { 

    if (!writer.writeHeader(directType(), fieldsCount())) 

    return false; 

  

    writer.onHeaderWritten(); 

    } 

  

    switch (writer.state()) { 

    case 0: 
    if (!writer.writeLongArray("arr", arr)) 

    return false; 

  

    writer.incrementState(); 

  

    case 1: 

    if (!writer.writeInt("idx", idx)) 

    return false; 

  

    writer.incrementState(); 

  

    } 

  

    return true; 

    } {code}

Which is not happening in another serialization method in the same class: 


{code:java}
public static void writeTo(DataOutput out, @Nullable GridLongList list) throws 
IOException { 

    out.writeInt(list != null ? list.idx : -1); 

  

    if (list != null) { 

    for (int i = 0; i < list.idx; i++) 

    out.writeLong(list.arr[i]); 

    } 

} {code}

So, we can simply reduce messages size by sending only a valuable part of the 
array.

 

 

I created this issue according to a discussion on the mailing list:

http://apache-ignite-developers.2346864.n4.nabble.com/Optimize-GridLongList-serialization-td28571.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (IGNITE-5994) IgniteInternalCache.invokeAsync().get() can return null

2017-08-08 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-5994:
---

 Summary: IgniteInternalCache.invokeAsync().get() can return null
 Key: IGNITE-5994
 URL: https://issues.apache.org/jira/browse/IGNITE-5994
 Project: Ignite
  Issue Type: Bug
Reporter: Alexander Menshikov


The IgniteInternalCache.invoke() always return an EntryProcessorResult, but the 
IgniteInternalCache.invokeAsync().get() can return the null in case when an 
EntryProcessor has returned the null.

Code from reproducer:

```Java
final EntryProcessor ep = new EntryProcessor() {
@Override
public Object process(MutableEntry entry,
Object... objects) throws EntryProcessorException {
return null;
}
};

EntryProcessorResult result = utilCache.invoke("test", ep);

assertNotNull(result);
assertNull(result.get());


result = utilCache.invokeAsync("test", ep).get();

// Assert here!!!
assertNotNull(result);
assertNull(result.get());
```
It can be optimization. Nevertheless results of invoke() must be equals with 
results of invokeAsync().get(). So there are two options:

1) To do so would be the invokeAsync(key, ep).get() returned the null too for 
the optimization.
2) Or to do so would be the invoke(key, ep) returned an EntryProcessorResult 
for a logical consistency.

NOTE: Don't confuse with IgniteCache.invoke.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (IGNITE-4713) refactoring of GridFinishedFuture and GridFutureAdapter

2017-02-16 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-4713:
---

 Summary:  refactoring of GridFinishedFuture and GridFutureAdapter
 Key: IGNITE-4713
 URL: https://issues.apache.org/jira/browse/IGNITE-4713
 Project: Ignite
  Issue Type: Improvement
  Components: community
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov
Priority: Trivial


I propose to do refactoring of classes "GridFinishedFuture" and 
"GridFutureAdapter". These is field "resFlag" wiche can equals "ERR = 1" or 
"RES = 2". So I can replace it to one "bool haveResult" filed.

If there are no objections, I'm ready to proceed. If you find more such 
classes, please write about them.



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


[jira] [Created] (IGNITE-4612) Minor code cleanup

2017-01-25 Thread Alexander Menshikov (JIRA)
Alexander Menshikov created IGNITE-4612:
---

 Summary: Minor code cleanup
 Key: IGNITE-4612
 URL: https://issues.apache.org/jira/browse/IGNITE-4612
 Project: Ignite
  Issue Type: Task
Reporter: Alexander Menshikov
Assignee: Alexander Menshikov
Priority: Trivial


This issue about trivial code cleanup.

1) Cleanup unused imports/variable/argument.
2) Rename ignored exception to "ignored".
3) ...
4) PROFIT :)



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