[jira] [Assigned] (IGNITE-17244) .NET: Thin 3.0: Optimize async request handling

2023-04-10 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-17244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-17244:
-

Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Thin 3.0: Optimize async request handling
> ---
>
> Key: IGNITE-17244
> URL: https://issues.apache.org/jira/browse/IGNITE-17244
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, ignite-3
>
> Reduce allocations when handling async requests in *ClientSocket*.
> Look into combining the following functionality into a single object that can 
> be pooled:
> * IBufferWriter - to write the request
> * IValueTaskSource - to represent the task completion
> * IThreadPoolWorkItem - to handle response on thread pool efficiently
> See PoolingAsyncValueTaskMethodBuilder details: 
> https://devblogs.microsoft.com/dotnet/how-async-await-really-works/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-19260) .NET: Thin 3.0: Support nested MemberInit projections in LINQ

2023-04-08 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-19260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-19260:
--
Description: 
Support nested member init projections:

 
{code:c#}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class2Prop = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class2Prop { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
{code}




Also check possibility to combine with anonymous types.

  was:
Support nested member init projections:

 
{code:c#}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class1 = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class1 { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
{code}




Also check possibility to combine with anonymous types.


> .NET: Thin 3.0: Support nested MemberInit projections in LINQ
> -
>
> Key: IGNITE-19260
> URL: https://issues.apache.org/jira/browse/IGNITE-19260
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, LINQ, ignite-3
>
> Support nested member init projections:
>  
> {code:c#}
> [Test]
> public void TestSelectMemberInitSupportsFields1()
> {
>   var res = PocoView.AsQueryable()
>   .Where(x => x.Key == 2)
>   .Select(x => new MyClass1
>   {
>   Key = x.Key,
>   Class2Prop = new MyClass2
>   {
>   Value = x.Val
>   }
>   })
>   .ToArray();
>   Assert.AreEqual(1, res.Length);
>   var resRow = res[0];
> }
> private class MyClass1
> {
>   public long Key { get; set; }
>   public MyClass2 Class2Prop { get; set; } = null!;
> }
> private class MyClass2
> {
>   public string? Value { get; set; }
> }
> {code}
> Also check possibility to combine with anonymous types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-19260) .NET: Thin 3.0: Support nested MemberInit projections in LINQ

2023-04-08 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-19260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-19260:
--
Description: 
Support nested member init projections:

 
{code:c#}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class1 = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class1 { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
{code}




Also check possibility to combine with anonymous types.

  was:
Support nested member init projections:

 
{code:csharp}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class1 = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class1 { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
{code}




Also check possibility to combine with anonymous types.


> .NET: Thin 3.0: Support nested MemberInit projections in LINQ
> -
>
> Key: IGNITE-19260
> URL: https://issues.apache.org/jira/browse/IGNITE-19260
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, LINQ, ignite-3
>
> Support nested member init projections:
>  
> {code:c#}
> [Test]
> public void TestSelectMemberInitSupportsFields1()
> {
>   var res = PocoView.AsQueryable()
>   .Where(x => x.Key == 2)
>   .Select(x => new MyClass1
>   {
>   Key = x.Key,
>   Class1 = new MyClass2
>   {
>   Value = x.Val
>   }
>   })
>   .ToArray();
>   Assert.AreEqual(1, res.Length);
>   var resRow = res[0];
> }
> private class MyClass1
> {
>   public long Key { get; set; }
>   public MyClass2 Class1 { get; set; } = null!;
> }
> private class MyClass2
> {
>   public string? Value { get; set; }
> }
> {code}
> Also check possibility to combine with anonymous types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-19260) .NET: Thin 3.0: Support nested MemberInit projections in LINQ

2023-04-08 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-19260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-19260:
--
Description: 
Support nested member init projections:

 
{code:csharp}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class1 = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class1 { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
{code}




Also check possibility to combine with anonymous types.

  was:
Support nested member init projections:

 
{code:java}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class2Field = new MyClass2
{ Value = x.Val }
})
.ToArray();
Assert.AreEqual(1, res.Length);
var resRow = res[0];
}
private class MyClass1
{
public long Key
{ get; set; }

public MyClass2 Class2Field { get; set; }
= null!;
}
private class MyClass2
{
public string? Value
{ get; set; }
}
{code}




Also check possibility to combine with anonymous types.


> .NET: Thin 3.0: Support nested MemberInit projections in LINQ
> -
>
> Key: IGNITE-19260
> URL: https://issues.apache.org/jira/browse/IGNITE-19260
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, LINQ, ignite-3
>
> Support nested member init projections:
>  
> {code:csharp}
> [Test]
> public void TestSelectMemberInitSupportsFields1()
> {
>   var res = PocoView.AsQueryable()
>   .Where(x => x.Key == 2)
>   .Select(x => new MyClass1
>   {
>   Key = x.Key,
>   Class1 = new MyClass2
>   {
>   Value = x.Val
>   }
>   })
>   .ToArray();
>   Assert.AreEqual(1, res.Length);
>   var resRow = res[0];
> }
> private class MyClass1
> {
>   public long Key { get; set; }
>   public MyClass2 Class1 { get; set; } = null!;
> }
> private class MyClass2
> {
>   public string? Value { get; set; }
> }
> {code}
> Also check possibility to combine with anonymous types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (IGNITE-19260) .NET: Thin 3.0: Support nested MemberInit projections in LINQ

2023-04-08 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-19260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-19260:
--
Description: 
Support nested member init projections:

 
{code:java}
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class2Field = new MyClass2
{ Value = x.Val }
})
.ToArray();
Assert.AreEqual(1, res.Length);
var resRow = res[0];
}
private class MyClass1
{
public long Key
{ get; set; }

public MyClass2 Class2Field { get; set; }
= null!;
}
private class MyClass2
{
public string? Value
{ get; set; }
}
{code}




Also check possibility to combine with anonymous types.

  was:
Support nested member init projections:

```csharp
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class2Field = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class2Field { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
```

Also check possibility to combine with anonymous types.


> .NET: Thin 3.0: Support nested MemberInit projections in LINQ
> -
>
> Key: IGNITE-19260
> URL: https://issues.apache.org/jira/browse/IGNITE-19260
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, LINQ, ignite-3
>
> Support nested member init projections:
>  
> {code:java}
> [Test]
> public void TestSelectMemberInitSupportsFields1()
> {
> var res = PocoView.AsQueryable()
> .Where(x => x.Key == 2)
> .Select(x => new MyClass1
> {
> Key = x.Key,
> Class2Field = new MyClass2
> { Value = x.Val }
> })
> .ToArray();
> Assert.AreEqual(1, res.Length);
> var resRow = res[0];
> }
> private class MyClass1
> {
> public long Key
> { get; set; }
> public MyClass2 Class2Field { get; set; }
> = null!;
> }
> private class MyClass2
> {
> public string? Value
> { get; set; }
> }
> {code}
> Also check possibility to combine with anonymous types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (IGNITE-19260) .NET: Thin 3.0: Support nested MemberInit projections in LINQ

2023-04-08 Thread Sergey Stronchinskiy (Jira)
Sergey Stronchinskiy created IGNITE-19260:
-

 Summary: .NET: Thin 3.0: Support nested MemberInit projections in 
LINQ
 Key: IGNITE-19260
 URL: https://issues.apache.org/jira/browse/IGNITE-19260
 Project: Ignite
  Issue Type: Improvement
  Components: platforms
Reporter: Sergey Stronchinskiy
Assignee: Sergey Stronchinskiy


Support nested member init projections:

```csharp
[Test]
public void TestSelectMemberInitSupportsFields1()
{
var res = PocoView.AsQueryable()
.Where(x => x.Key == 2)
.Select(x => new MyClass1
{
Key = x.Key,
Class2Field = new MyClass2
{
Value = x.Val
}
})
.ToArray();

Assert.AreEqual(1, res.Length);
var resRow = res[0];
}

private class MyClass1
{
public long Key { get; set; }

public MyClass2 Class2Field { get; set; } = null!;
}

private class MyClass2
{
public string? Value { get; set; }
}
```

Also check possibility to combine with anonymous types.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (IGNITE-18120) .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ

2023-01-07 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-18120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-18120:
-

Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ
> --
>
> Key: IGNITE-18120
> URL: https://issues.apache.org/jira/browse/IGNITE-18120
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, LINQ, ignite-3
>
> Ignite LINQ provider allows anonymous type projections:
> {code}
> query.Select(emp => new {Id = emp.Key, Name = emp.Value.Name});
> {code}
> However, it does not work with a custom class:
> {code}
> query.Select(emp => new Foo {Id = emp.Key, Name = emp.Value.Name});
> {code}
> throws exception:
> {code}
> System.NotSupportedException : The expression 'new Foo() {Id = [x].Key}' 
> (type: System.Linq.Expressions.MemberInitExpression) is not supported.
> {code}
> Add VisitMemberInit overload to CacheQueryExpressionVisitor to support this 
> scenario. See linked SO page for more details - there is a proposed fix as 
> well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-13754) .NET: LINQ provider emits incorrect table alias for queries with JOIN and GROUP BY combined

2021-01-11 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17262893#comment-17262893
 ] 

Sergey Stronchinskiy commented on IGNITE-13754:
---

[~ptupitsyn] Looks good to me!

> .NET: LINQ provider emits incorrect table alias for queries with JOIN and 
> GROUP BY combined
> ---
>
> Key: IGNITE-13754
> URL: https://issues.apache.org/jira/browse/IGNITE-13754
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: .NET
> Fix For: 2.10
>
> Attachments: Meeting.cs, MeetingAttachment.cs, Program.cs
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> See the attached reproducer. Generated SQL is:
> {code}
> select _T0.MEETINGID, max (_T0.AttachmentDate)  from USERSCHEMA.MEETING as 
> _T0 inner join USERSCHEMA.MEETINGATTACHMENT as _T1 on (_T1.MEETINGID = 
> _T0.MEETINGID) group by (_T0.MEETINGID)
> {code}
> {{_T0.AttachmentDate}} should be {{_T1.AttachmentDate}} here.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-13011) .NET: Thin client Kubernetes discovery

2020-11-24 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-13011:
-

Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Thin client Kubernetes discovery
> --
>
> Key: IGNITE-13011
> URL: https://issues.apache.org/jira/browse/IGNITE-13011
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Thin clients should be able to discover servers from within Kubernetes pod 
> through k8s API, without specifying any IP addresses.
> E.g. we can retrieve pod list from within the pod like this:
> {code}
> curl -v --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H 
> "Authorization: Bearer $(cat 
> /var/run/secrets/kubernetes.io/serviceaccount/token)" 
> https://kubernetes.default.svc/api/v1/namespaces/MY_NAMESPACE/pods
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-13336) .NET: Misleading LINQ exception when expression can't be translated

2020-11-13 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17231750#comment-17231750
 ] 

Sergey Stronchinskiy commented on IGNITE-13336:
---

[~ptupitsyn] please take a look.

> .NET: Misleading LINQ exception when expression can't be translated
> ---
>
> Key: IGNITE-13336
> URL: https://issues.apache.org/jira/browse/IGNITE-13336
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.8.1
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET
> Fix For: 2.10
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The following program results in a cryptic exception, when the problem is 
> simply lack of Expression<> wrapper around the query filter:
> {code}
> class Program
> {
> private static readonly IIgnite Ignite = Ignition.Start();
> static void Main(string[] args)
> {
> var cache = GetCache();
> cache["1"] = new Foo();
> var res = Where2(e => e.Value.X == 0);
> Console.WriteLine(res);
> }
> public static ICache GetCache()
> {
> var cacheName = typeof(T).Name;
> var cfg = new CacheConfiguration(cacheName, new 
> QueryEntity(typeof(T)));
> return Ignite.GetOrCreateCache(cfg);
> }
> public static List Where2(Func, bool> 
> query)
> {
> var queryResult = GetCache().AsCacheQueryable().Where(x => 
> query(x));
> return queryResult.Select(x => x.Value).ToList();
> }
> }
> public class Foo
> {
> [QuerySqlField] public int X { get; set; }
> }
> {code}
> We should throw a better exception that says "LINQ expression can't be 
> translated to SQL because of ..."



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-7154) .NET: Thin client: Async queries

2020-10-07 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-7154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-7154:
-
Fix Version/s: 3.0

> .NET: Thin client: Async queries
> 
>
> Key: IGNITE-7154
> URL: https://issues.apache.org/jira/browse/IGNITE-7154
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
> Fix For: 3.0
>
>
> IGNITE-7109  adds async cache operations, but query methods remain 
> synchronous.
> We should look for ideas at Entity Framework {{ToListAsync}} and 
> {{ToArrayAsync}} .
> 1. Create {{IAsyncQueryCursor}} and {{IAsyncFieldsQueryCursor}} interfaces:
> {code}
> public interface IAsyncQueryCursor : IQueryCursor
> {
> Task> GetAllAsync();
> }
> {code} 
> 2. Provide async counterparts for queries: {{Task 
> ICacheClient.QueryAsync(...)}}
> This way both initial query and data retrieval can be made asynchronous.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13556) .NET: Thin client: Transactions async support

2020-10-07 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13556:
--
Summary: .NET: Thin client: Transactions async support   (was: .NET: Thin 
client: Transactions support async)

> .NET: Thin client: Transactions async support 
> --
>
> Key: IGNITE-13556
> URL: https://issues.apache.org/jira/browse/IGNITE-13556
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.10
>Reporter: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 3.0
>
>
> Currently are handled via `ThreadLocal` which does not support async flow.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13556) .NET: Thin client: Transactions support async

2020-10-07 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13556:
--
Fix Version/s: 3.0

> .NET: Thin client: Transactions support async
> -
>
> Key: IGNITE-13556
> URL: https://issues.apache.org/jira/browse/IGNITE-13556
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.10
>Reporter: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 3.0
>
>
> Currently are handled via `ThreadLocal` which does not support async flow.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (IGNITE-13556) .NET: Thin client: Transactions support async

2020-10-07 Thread Sergey Stronchinskiy (Jira)
Sergey Stronchinskiy created IGNITE-13556:
-

 Summary: .NET: Thin client: Transactions support async
 Key: IGNITE-13556
 URL: https://issues.apache.org/jira/browse/IGNITE-13556
 Project: Ignite
  Issue Type: Improvement
  Components: platforms, thin client
Affects Versions: 2.10
Reporter: Sergey Stronchinskiy


Currently are handled via `ThreadLocal` which does not support async flow.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13556) .NET: Thin client: Transactions support async

2020-10-07 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13556:
--
Labels: .NET iep-34  (was: .NET .net-core iep-34)

> .NET: Thin client: Transactions support async
> -
>
> Key: IGNITE-13556
> URL: https://issues.apache.org/jira/browse/IGNITE-13556
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.10
>Reporter: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
>
> Currently are handled via `ThreadLocal` which does not support async flow.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13470) .NET: Add async counterparts to all applicable thin client APIs

2020-10-02 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13470:
--
Component/s: thin client

> .NET: Add async counterparts to all applicable thin client APIs
> ---
>
> Key: IGNITE-13470
> URL: https://issues.apache.org/jira/browse/IGNITE-13470
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: .NET
> Fix For: 2.10
>
>
> Add async counterparts to the following .NET Thin Client APIs
> * ICacheClient.GetConfiguration
> * IClientCluster - all methods
> * IClientClusterGroup.GetNodes, GetNode
> * IIgniteClient - CreateCache, GetOrCreateCache, DestroyCache



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-13336) .NET: Misleading LINQ exception when expression can't be translated

2020-10-02 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-13336:
-

Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Misleading LINQ exception when expression can't be translated
> ---
>
> Key: IGNITE-13336
> URL: https://issues.apache.org/jira/browse/IGNITE-13336
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.8.1
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET
> Fix For: 2.10
>
>
> The following program results in a cryptic exception, when the problem is 
> simply lack of Expression<> wrapper around the query filter:
> {code}
> class Program
> {
> private static readonly IIgnite Ignite = Ignition.Start();
> static void Main(string[] args)
> {
> var cache = GetCache();
> cache["1"] = new Foo();
> var res = Where2(e => e.Value.X == 0);
> Console.WriteLine(res);
> }
> public static ICache GetCache()
> {
> var cacheName = typeof(T).Name;
> var cfg = new CacheConfiguration(cacheName, new 
> QueryEntity(typeof(T)));
> return Ignite.GetOrCreateCache(cfg);
> }
> public static List Where2(Expression T>, bool>> query)
> {
> var queryResult = GetCache().AsCacheQueryable().Where(query);
> return queryResult.Select(x => x.Value).ToList();
> }
> }
> public class Foo
> {
> [QuerySqlField] public int X { get; set; }
> }
> {code}
> We should throw a better exception that says "LINQ expression can't be 
> translated to SQL because of ..."



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-13296) .NET: TransactionImpl finalizer can crash the process

2020-09-06 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191245#comment-17191245
 ] 

Sergey Stronchinskiy commented on IGNITE-13296:
---

[~ptupitsyn] Thank you!

> .NET: TransactionImpl finalizer can crash the process
> -
>
> Key: IGNITE-13296
> URL: https://issues.apache.org/jira/browse/IGNITE-13296
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
> Fix For: 2.10
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> ~TransactionImpl potentially throws an exception (e.g. when grid is stopped), 
> causing the entire process to abort.
> GetLocalActiveTransactions is especially problematic - the method is 
> informational, yet will result in all the returned transactions to be 
> finalized later.
> * Finalizers should not throw exceptions
> * Stopped grid is a valid use case
> * GetLocalActiveTransactions should be fixed to return "read-only" 
> transactions that won't be finalized
> Review all filalizers and make sure they are safe.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-13296) .NET: TransactionImpl finalizer can crash the process

2020-07-24 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-13296:
-

Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: TransactionImpl finalizer can crash the process
> -
>
> Key: IGNITE-13296
> URL: https://issues.apache.org/jira/browse/IGNITE-13296
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
> Fix For: 2.10
>
>
> ~TransactionImpl potentially throws an exception (e.g. when grid is stopped), 
> causing the entire process to abort.
> GetLocalActiveTransactions is especially problematic - the method is 
> informational, yet will result in all the returned transactions to be 
> finalized later.
> * Finalizers should not throw exceptions
> * Stopped grid is a valid use case
> * GetLocalActiveTransactions should be fixed to return "read-only" 
> transactions that won't be finalized
> Review all filalizers and make sure they are safe.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-07-21 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17161990#comment-17161990
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

[~ptupitsyn] Submitted for review.

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-08 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17154033#comment-17154033
 ] 

Sergey Stronchinskiy commented on IGNITE-13214:
---

[~ptupitsyn] Looks great!

> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Pavel Tupitsyn
>Priority: Critical
>  Labels: .NET, transactions
> Fix For: 2.9
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> [mappings=IgniteTxMappingsImpl [], 
> {noformat}
> _Cache_ is _IIgnite.Cache()_  and _Transactions_ is 
> _IIgnite.GetTransactions()_



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-07-07 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153103#comment-17153103
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

[~ptupitsyn] Thank you!

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-07 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153080#comment-17153080
 ] 

Sergey Stronchinskiy commented on IGNITE-13214:
---

[~ptupitsyn]  Sure, please see my comments on GitHub.

> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Pavel Tupitsyn
>Priority: Critical
>  Labels: .NET, transactions
> Fix For: 2.9
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> [mappings=IgniteTxMappingsImpl [], 
> {noformat}
> _Cache_ is _IIgnite.Cache()_  and _Transactions_ is 
> _IIgnite.GetTransactions()_



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-13226) .NET: Thin Client Compute leaks ClientNotificationHandler instances

2020-07-07 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153072#comment-17153072
 ] 

Sergey Stronchinskiy commented on IGNITE-13226:
---

[~ptupitsyn] looks fine to me!

> .NET: Thin Client Compute leaks ClientNotificationHandler instances
> ---
>
> Key: IGNITE-13226
> URL: https://issues.apache.org/jira/browse/IGNITE-13226
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.9
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Critical
>  Labels: .NET
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In multithreaded thin client compute scenarios there is a possibility for 
> ClientNotificationHandler leak: handlers remain in 
> ClientSocket._notificationListeners even after corresponding tasks have 
> completed.
> To reproduce, add the following code at the end of 
> ComputeClientTests.TestExecuteJavaTaskAsyncMultithreaded:
> {code}
> var failoverSocket = 
> TestUtils.GetPrivateField(client, "_socket");
> var socket = 
> TestUtils.GetPrivateField(failoverSocket, "_socket");
> var listeners = TestUtils.GetPrivateField(socket, 
> "_notificationListeners");
> Assert.IsEmpty(listeners);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-07-05 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17151664#comment-17151664
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

Hi [~ptupitsyn] I've created a draft PR. Can you take a quick look?

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-05 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13214:
--
Description: 
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}

{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 
{noformat}

_Cache_ is _IIgnite.Cache()_  and _Transactions_ is 
_IIgnite.GetTransactions()_

  was:
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}

{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 
{noformat}

```Cache``` is ```IIgnite.Cache()```  and ```Transactions``` is 
```IIgnite.GetTransactions()```


> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Critical
>  Labels: .NET, transactions
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> 

[jira] [Updated] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-05 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13214:
--
Description: 
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}

{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 
{noformat}

```Cache``` is ```IIgnite.Cache()```  and ```Transactions``` is 
```IIgnite.GetTransactions()```

  was:
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}

{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 
{noformat}

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`


> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Critical
>  Labels: .NET, transactions
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> 

[jira] [Updated] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-05 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13214:
--
Description: 
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}

{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 
{noformat}

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`

  was:
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}



{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 

{noformat}

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`


> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Critical
>  Labels: .NET, transactions
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> 

[jira] [Updated] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-05 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13214:
--
Description: 
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

{code:c#}
using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}
{code}



{noformat}
Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 

{noformat}

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`

  was:
Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}

Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`


> .NET different behavior when using TransactionScope and  ITransactions.Start
> 
>
> Key: IGNITE-13214
> URL: https://issues.apache.org/jira/browse/IGNITE-13214
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Critical
>  Labels: .NET, transactions
>
> Next code runs fine:
> {code:c#}
> var barier = new Barrier(2);
> var cache = Cache();
> cache.Put(1, 1);
> var task = Task.Factory.StartNew(() =>
> {
> var otherCache = Cache();
> barier.SignalAndWait();
> otherCache.Put(1, 10);
> barier.SignalAndWait();
> });
> using (var txscp = new 
> TransactionScope(TransactionScopeOption.Required, new 
> TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> txscp.Complete();
> }
> Task.WaitAll(task);
> barier.Dispose();
> {code}
> When I switch to Ignite transactions I get exception:
> {code:c#}
> using (var tx = 
> Transactions.TxStart(TransactionConcurrency.Optimistic, 
> TransactionIsolation.Serializable))
> {
> var before = cache.Get(1);
> barier.SignalAndWait();
> barier.SignalAndWait();
> tx.Commit();
> }
> {code}
> {noformat}
> Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
> prepare transaction (lock conflict): GridNearTxLocal 
> [mappings=IgniteTxMappingsImpl [], 
> {noformat}
> 

[jira] [Created] (IGNITE-13214) .NET different behavior when using TransactionScope and ITransactions.Start

2020-07-05 Thread Sergey Stronchinskiy (Jira)
Sergey Stronchinskiy created IGNITE-13214:
-

 Summary: .NET different behavior when using TransactionScope and  
ITransactions.Start
 Key: IGNITE-13214
 URL: https://issues.apache.org/jira/browse/IGNITE-13214
 Project: Ignite
  Issue Type: Bug
  Components: platforms
Reporter: Sergey Stronchinskiy


Next code runs fine:

{code:c#}
var barier = new Barrier(2);
var cache = Cache();
cache.Put(1, 1);
var task = Task.Factory.StartNew(() =>
{
var otherCache = Cache();
barier.SignalAndWait();
otherCache.Put(1, 10);
barier.SignalAndWait();
});
using (var txscp = new 
TransactionScope(TransactionScopeOption.Required, new 
TransactionOptions{IsolationLevel = IsolationLevel.Serializable}))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
txscp.Complete();
}
Task.WaitAll(task);
barier.Dispose();
{code}

When I switch to Ignite transactions I get exception:

using (var tx = 
Transactions.TxStart(TransactionConcurrency.Optimistic, 
TransactionIsolation.Serializable))
{
var before = cache.Get(1);
barier.SignalAndWait();
barier.SignalAndWait();
tx.Commit();
}

Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to 
prepare transaction (lock conflict): GridNearTxLocal 
[mappings=IgniteTxMappingsImpl [], 

`Cache` is `IIgnite.Cache()`  and `Transactions` is 
`IIgnite.GetTransactions()`



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13077) .NET: transaction shared for multiple Ignite trying to start transactions in one thread

2020-05-26 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13077:
--
Summary: .NET: transaction shared for multiple Ignite trying to start 
transactions in one thread  (was: .NET transaction gets overwritten for 
multiple Ignite trying to start transactions in one thread)

> .NET: transaction shared for multiple Ignite trying to start transactions in 
> one thread
> ---
>
> Key: IGNITE-13077
> URL: https://issues.apache.org/jira/browse/IGNITE-13077
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET
>
> {code:c#}
> var trs1 = Ignition.Start(new IgniteConfiguration
>      {
>          IgniteInstanceName = "First"
>      })
>      .GetTransactions();
>  trs1.TxStart();
>  var trs2 = Ignition.Start(new IgniteConfiguration
>      {
>          IgniteInstanceName = "Second"
>      })
>      .GetTransactions();
>  Assert.IsNull(trs2.Tx); // fails
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-13077) .NET: transaction shared for multiple Ignite instances trying to start transactions in one thread

2020-05-26 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-13077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-13077:
--
Summary: .NET: transaction shared for multiple Ignite instances trying to 
start transactions in one thread  (was: .NET: transaction shared for multiple 
Ignite trying to start transactions in one thread)

> .NET: transaction shared for multiple Ignite instances trying to start 
> transactions in one thread
> -
>
> Key: IGNITE-13077
> URL: https://issues.apache.org/jira/browse/IGNITE-13077
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET
>
> {code:c#}
> var trs1 = Ignition.Start(new IgniteConfiguration
>      {
>          IgniteInstanceName = "First"
>      })
>      .GetTransactions();
>  trs1.TxStart();
>  var trs2 = Ignition.Start(new IgniteConfiguration
>      {
>          IgniteInstanceName = "Second"
>      })
>      .GetTransactions();
>  Assert.IsNull(trs2.Tx); // fails
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (IGNITE-13077) .NET transaction gets overwritten for multiple Ignite trying to start transactions in one thread

2020-05-26 Thread Sergey Stronchinskiy (Jira)
Sergey Stronchinskiy created IGNITE-13077:
-

 Summary: .NET transaction gets overwritten for multiple Ignite 
trying to start transactions in one thread
 Key: IGNITE-13077
 URL: https://issues.apache.org/jira/browse/IGNITE-13077
 Project: Ignite
  Issue Type: Bug
  Components: platforms
Reporter: Sergey Stronchinskiy


{code:c#}
var trs1 = Ignition.Start(new IgniteConfiguration
     {
         IgniteInstanceName = "First"
     })
     .GetTransactions();
 trs1.TxStart();
 var trs2 = Ignition.Start(new IgniteConfiguration
     {
         IgniteInstanceName = "Second"
     })
     .GetTransactions();
 Assert.IsNull(trs2.Tx); // fails
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (IGNITE-7369) .NET: Thin client: Transactions

2020-05-10 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17103678#comment-17103678
 ] 

Sergey Stronchinskiy edited comment on IGNITE-7369 at 5/10/20, 7:25 AM:


Hi [~ptupitsyn], I've underestimated the tasks complexity and overestimated my 
free time and will not able to finish this issue in provided timeframe. I think 
at leas 2 more weeks are needed.


was (Author: gurustron):
Hi [~ptupitsyn], I've underestimated the tasks complexity and overestimated my 
free time and will not able to finish this issue in provided timeframe.

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-05-10 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17103678#comment-17103678
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

Hi [~ptupitsyn], I've underestimated the tasks complexity and overestimated my 
free time and will not able to finish this issue in provided timeframe.

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12467) Python Thin Client Support for Transactions

2020-05-04 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-12467:
--
Component/s: python

> Python Thin Client Support for Transactions
> ---
>
> Key: IGNITE-12467
> URL: https://issues.apache.org/jira/browse/IGNITE-12467
> Project: Ignite
>  Issue Type: Bug
>  Components: python, thin client
>Affects Versions: 2.7.6
>Reporter: Robert Emanuele
>Priority: Major
>  Labels: iep-34
>
> I see that https://issues.apache.org/jira/browse/IGNITE-9410 is marked as 
> resolved but I have not seen the changes in the python thin client, pyignite. 
>  Am I looking in the wrong place  
> ([https://github.com/apache/ignite/tree/master/modules/platforms/python]), or 
> is there more work to do?
> If there is more work, are there changes that I can port?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-04-21 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17088763#comment-17088763
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

[~ptupitsyn], I think i will need around 3 weeks more.

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7369) .NET: Thin client: Transactions

2020-04-20 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17087573#comment-17087573
 ] 

Sergey Stronchinskiy commented on IGNITE-7369:
--

[~ptupitsyn], yes, I have. Sorry for not updating ticket status.

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-7369) .NET: Thin client: Transactions

2020-04-09 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-7369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-7369:


Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Thin client: Transactions
> ---
>
> Key: IGNITE-7369
> URL: https://issues.apache.org/jira/browse/IGNITE-7369
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, iep-34
> Fix For: 2.9
>
>
> Implement transactions in thin client protocol and .NET thin client.
> Main issue: Ignite transactions are tied to a specific thread.
> See how JDBC works around this by starting a dedicated thread.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7609) .NET: FieldsQueryCursor should expose data types too

2020-04-09 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17079438#comment-17079438
 ] 

Sergey Stronchinskiy commented on IGNITE-7609:
--

[~ptupitsyn], Thank you!

> .NET: FieldsQueryCursor should expose data types too
> 
>
> Key: IGNITE-7609
> URL: https://issues.apache.org/jira/browse/IGNITE-7609
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
> Fix For: 2.9
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> See IGNITE-7607 for Java, add same thing to .NET:
> {code}
> public interface IFieldsQueryCursor
> {
> ...
> IList FieldTypes
> }
> {code}
> T could be string or Type, needs investigation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7609) .NET: FieldsQueryCursor should expose data types too

2020-04-06 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17076367#comment-17076367
 ] 

Sergey Stronchinskiy commented on IGNITE-7609:
--

[~ptupitsyn], Please take a look.

> .NET: FieldsQueryCursor should expose data types too
> 
>
> Key: IGNITE-7609
> URL: https://issues.apache.org/jira/browse/IGNITE-7609
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> See IGNITE-7607 for Java, add same thing to .NET:
> {code}
> public interface IFieldsQueryCursor
> {
> ...
> IList FieldTypes
> }
> {code}
> T could be string or Type, needs investigation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-9017) .NET: Clear cache statistics

2020-03-20 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-9017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063620#comment-17063620
 ] 

Sergey Stronchinskiy commented on IGNITE-9017:
--

Thank you, [~ptupitsyn]!

> .NET: Clear cache statistics
> 
>
> Key: IGNITE-9017
> URL: https://issues.apache.org/jira/browse/IGNITE-9017
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.7
>Reporter: Denis Garus
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> ICache.ClearStatistics, ICluster.ClearStatistics.
> See IGNITE-8705



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-7609) .NET: FieldsQueryCursor should expose data types too

2020-03-19 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-7609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-7609:


Assignee: Sergey Stronchinskiy

> .NET: FieldsQueryCursor should expose data types too
> 
>
> Key: IGNITE-7609
> URL: https://issues.apache.org/jira/browse/IGNITE-7609
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
>
> See IGNITE-7607 for Java, add same thing to .NET:
> {code}
> public interface IFieldsQueryCursor
> {
> ...
> IList FieldTypes
> }
> {code}
> T could be string or Type, needs investigation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7136) .NET: IndexesAllocatedPages metrics

2020-03-18 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17062094#comment-17062094
 ] 

Sergey Stronchinskiy commented on IGNITE-7136:
--

The parent ticket is marked as "Won't fix" is this one still relevant?

> .NET: IndexesAllocatedPages metrics
> ---
>
> Key: IGNITE-7136
> URL: https://issues.apache.org/jira/browse/IGNITE-7136
> Project: Ignite
>  Issue Type: Sub-task
>  Components: platforms
>Reporter: Nikolay Izhikov
>Priority: Major
>  Labels: .NET, iep-6
> Fix For: 2.9
>
>
> New JMX metric implemented in IGNITE-6903.
> We need to add support for this metric to .Net 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7276) .NET: Enable/disable cache statistics in runtime

2020-02-26 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17045382#comment-17045382
 ] 

Sergey Stronchinskiy commented on IGNITE-7276:
--

[~ptupitsyn], thank you! 

> .NET: Enable/disable cache statistics in runtime
> 
>
> Key: IGNITE-7276
> URL: https://issues.apache.org/jira/browse/IGNITE-7276
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> {{ICache.EnableStatistics}}, {{ICluster.EnableStatistics}}.
> See IGNITE-369.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7276) .NET: Enable/disable cache statistics in runtime

2020-02-22 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17042701#comment-17042701
 ] 

Sergey Stronchinskiy commented on IGNITE-7276:
--

Hi, [~ptupitsyn]. Please take a look.

> .NET: Enable/disable cache statistics in runtime
> 
>
> Key: IGNITE-7276
> URL: https://issues.apache.org/jira/browse/IGNITE-7276
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> {{ICache.EnableStatistics}}, {{ICluster.EnableStatistics}}.
> See IGNITE-369.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7276) .NET: Enable/disable cache statistics in runtime

2020-02-19 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17040520#comment-17040520
 ] 

Sergey Stronchinskiy commented on IGNITE-7276:
--

Hi, [~ptupitsyn], thank you. Resolved all issues on github, please take a look.

> .NET: Enable/disable cache statistics in runtime
> 
>
> Key: IGNITE-7276
> URL: https://issues.apache.org/jira/browse/IGNITE-7276
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> {{ICache.EnableStatistics}}, {{ICluster.EnableStatistics}}.
> See IGNITE-369.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-7276) .NET: Enable/disable cache statistics in runtime

2020-02-15 Thread Sergey Stronchinskiy (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17037593#comment-17037593
 ] 

Sergey Stronchinskiy commented on IGNITE-7276:
--

[https://ci.ignite.apache.org/viewQueued.html?itemId=5053951]

[https://ci.ignite.apache.org/viewQueued.html?itemId=5053953]

> .NET: Enable/disable cache statistics in runtime
> 
>
> Key: IGNITE-7276
> URL: https://issues.apache.org/jira/browse/IGNITE-7276
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{ICache.EnableStatistics}}, {{ICluster.EnableStatistics}}.
> See IGNITE-369.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-7276) .NET: Enable/disable cache statistics in runtime

2020-01-03 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-7276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-7276:


Assignee: Sergey Stronchinskiy

> .NET: Enable/disable cache statistics in runtime
> 
>
> Key: IGNITE-7276
> URL: https://issues.apache.org/jira/browse/IGNITE-7276
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>
> {{ICache.EnableStatistics}}, {{ICluster.EnableStatistics}}.
> See IGNITE-369.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-9017) .NET: Clear cache statistics

2019-11-26 Thread Sergey Stronchinskiy (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-9017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-9017:


Assignee: Sergey Stronchinskiy

> .NET: Clear cache statistics
> 
>
> Key: IGNITE-9017
> URL: https://issues.apache.org/jira/browse/IGNITE-9017
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 2.7
>Reporter: Denis Garus
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET, newbie
>
> ICache.ClearStatistics, ICluster.ClearStatistics.
> See IGNITE-8705



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (IGNITE-7154) .NET: Thin client: Async queries

2018-03-07 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-7154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-7154:


Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: Thin client: Async queries
> 
>
> Key: IGNITE-7154
> URL: https://issues.apache.org/jira/browse/IGNITE-7154
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms, thin client
>Affects Versions: 2.4
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Major
>  Labels: .NET
>
> IGNITE-7109  adds async cache operations, but query methods remain 
> synchronous.
> We should look for ideas at Entity Framework {{ToListAsync}} and 
> {{ToArrayAsync}} .
> 1. Create {{IAsyncQueryCursor}} and {{IAsyncFieldsQueryCursor}} interfaces:
> {code}
> public interface IAsyncQueryCursor : IQueryCursor
> {
> Task GetAllAsync();
> }
> {code} 
> 2. Provide async counterparts for queries: {{Task 
> ICacheClient.QueryAsync(...)}}
> This way both initial query and data retrieval can be made asynchronous.



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


[jira] [Commented] (IGNITE-5298) .NET: DML update via LINQ

2018-03-06 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388506#comment-16388506
 ] 

Sergey Stronchinskiy commented on IGNITE-5298:
--

Hi, [~ptupitsyn]

Thank you for feedback. Everything should be fixed, please check.

> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Comment Edited] (IGNITE-5298) .NET: DML update via LINQ

2018-03-05 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16385806#comment-16385806
 ] 

Sergey Stronchinskiy edited comment on IGNITE-5298 at 3/5/18 8:50 AM:
--

Hi, [~ptupitsyn] 

Can you review this?

[Platform 
tests|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNet_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]

[Inspections|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNetInspections_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]


was (Author: gurustron):
Hi, [~ptupitsyn],

 

Can you review this?

[Platform 
tests|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNet_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]

[Inspections|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNetInspections_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]

> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Assigned] (IGNITE-5298) .NET: DML update via LINQ

2018-03-05 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-5298:


Assignee: Pavel Tupitsyn  (was: Sergey Stronchinskiy)

Hi, [~ptupitsyn],

 

Can you review this?

[Platform 
tests|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNet_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]

[Inspections|https://ci.ignite.apache.org/viewType.html?buildTypeId=IgniteTests24Java8_IgnitePlatformNetInspections_IgniteTests24Java8=pull%2F3599%2Fmerge=buildTypeStatusDiv]

> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Pavel Tupitsyn
>Priority: Major
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Commented] (IGNITE-5298) .NET: DML update via LINQ

2017-07-25 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16099836#comment-16099836
 ] 

Sergey Stronchinskiy commented on IGNITE-5298:
--

[~ptupitsyn],

??We may add another one as a separate task later??

Actually I thought about this too, that for now implement only more general 
approach and later in separate task the initializer syntax. 

So I will start implementation with {{IUpdateDescriptor}} approach(if you don't 
see any better name for it :) )

> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Commented] (IGNITE-5298) .NET: DML update via LINQ

2017-07-21 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16096367#comment-16096367
 ] 

Sergey Stronchinskiy commented on IGNITE-5298:
--

Hi [~ptupitsyn],

I've looked around a little bit and found few approaches to work around similar 
issues:

1. First approach is to pass an object initializer  in to update method like 
this:  

{code} persons.Where(x => x.Key > 10).UpdateAll(x => new Person{ OrgId = 42, 
Name = "Foo"}){code}

with signature of {{UpdateAll}} like {{public static int UpdateAll(this IQueryable> query, 
Expression> update)}}

For me it seems most clear and clean API but it has two drawbacks - if class 
has no parameterless constructor user will need to provide some dummy values 
which will not be actually parsed into SQL and if property has no public 
setter, then it would be impossible to update them.


2. {{Moq}} framework has an option to set properties of mocked object and uses 
{{==}} sign instead of {{=}} to achieve that:

{code}
Mock.Of( x => x.Name == "Foo" &&  x.OrgId = 42); 
{code}

Also there is an option which you suggested.

As for me i think first API is the way to go, cause second one is not that 
clear and the one from your suggestion will add a method with a signature which 
can be applied to anything and will be shown in intellisense suggestions to 
often. As for the restrictions of the API we can overcome them with extra 
method like:

{code}
persons.Where(x => x.Key > 10).UpdateAll(x => new { x.OrgId, x.Name, 
AddressName = x.Address.Name }, new { OrgId = 42, Name = "Foo", AddressName = 
"Bar"});
{code} 



> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Commented] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-07-04 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16073468#comment-16073468
 ] 

Sergey Stronchinskiy commented on IGNITE-5532:
--

[~ptupitsyn],

Done! =)

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all are placed in 
> one big {{CacheLinqTest}} class with two child classes 
> {{CacheLinqTestSimpleName}} and {{CacheLinqTestSqlEscapeAll}}) - break up 
> into partial classes, move to separate folder.



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


[jira] [Commented] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-07-04 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16073337#comment-16073337
 ] 

Sergey Stronchinskiy commented on IGNITE-5532:
--

Hi [~ptupitsyn],

Maybe I'll just rename it {{CacheLinqTest.Functions.Misc}} -> 
{{CacheLinqTest.Functions}} cause they seem to be grouped nicely but I don't 
think it would be nice to split all functions into separate files? 

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all are placed in 
> one big {{CacheLinqTest}} class with two child classes 
> {{CacheLinqTestSimpleName}} and {{CacheLinqTestSqlEscapeAll}}) - break up 
> into partial classes, move to separate folder.



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


[jira] [Commented] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-07-03 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16072790#comment-16072790
 ] 

Sergey Stronchinskiy commented on IGNITE-5532:
--

[~ptupitsyn]

Can you please review this? 

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all are placed in 
> one big {{CacheLinqTest}} class with two child classes 
> {{CacheLinqTestSimpleName}} and {{CacheLinqTestSqlEscapeAll}}) - break up 
> into partial classes, move to separate folder.



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


[jira] [Assigned] (IGNITE-5298) .NET: DML update via LINQ

2017-06-22 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-5298:


Assignee: Sergey Stronchinskiy  (was: Pavel Tupitsyn)

> .NET: DML update via LINQ
> -
>
> Key: IGNITE-5298
> URL: https://issues.apache.org/jira/browse/IGNITE-5298
> Project: Ignite
>  Issue Type: New Feature
>  Components: platforms
>Affects Versions: 2.1
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ, important
>
> Bulk update with LINQ:
> {code}
> var persons = ignite.GetCache("persons").AsCacheQueryable();
> int affectedRows = persons.Where(x => x.Key > 10).UpdateAll(x => 
> x.Value.OrgId = 7);
> {code}
> See bulk delete with {{RemoveAll}}, IGNITE-4904.



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


[jira] [Updated] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5532:
-
Description: Clean up unit tests for cache {{LINQ}} queries(currently all 
are placed in one big {{CacheLinqTest}} class with two child classes 
{{CacheLinqTestSimpleName}} and {{CacheLinqTestSqlEscapeAll}}) - break up into 
partial classes, move to separate folder.  (was: Clean up unit tests for cache 
{{LINQ}} queries(currently all are placed in one big {{CacheLinqTest}} class) - 
break up into partial classes, move to separate folder.)

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all are placed in 
> one big {{CacheLinqTest}} class with two child classes 
> {{CacheLinqTestSimpleName}} and {{CacheLinqTestSqlEscapeAll}}) - break up 
> into partial classes, move to separate folder.



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


[jira] [Updated] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5532:
-
Description: Clean up unit tests for cache {{LINQ}} queries(currently all 
placed in one big {{CacheLinqTest}} class) - break up into partial classes, 
move to separate folder.  (was: Clean up unit tests for cache {{LINQ}} 
queries(currently all placed in one big {{C) - break up into partial classes, 
move to separate folder.)

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all placed in one 
> big {{CacheLinqTest}} class) - break up into partial classes, move to 
> separate folder.



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


[jira] [Updated] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5532:
-
Description: Clean up unit tests for cache {{LINQ}} queries(currently all 
are placed in one big {{CacheLinqTest}} class) - break up into partial classes, 
move to separate folder.  (was: Clean up unit tests for cache {{LINQ}} 
queries(currently all placed in one big {{CacheLinqTest}} class) - break up 
into partial classes, move to separate folder.)

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all are placed in 
> one big {{CacheLinqTest}} class) - break up into partial classes, move to 
> separate folder.



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


[jira] [Updated] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5532:
-
Description: Clean up unit tests for cache {{LINQ}} queries(currently all 
placed in one big {{C) - break up into partial classes, move to separate 
folder.  (was: Clean up unit tests for {{LINQ}} queries - break up into partial 
classes, move to separate folder.)

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for cache {{LINQ}} queries(currently all placed in one 
> big {{C) - break up into partial classes, move to separate folder.



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


[jira] [Updated] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5532:
-
Description: Clean up unit tests for {{LINQ}} queries - break up into 
partial classes, move to separate folder.

> .NET: Clean up and refactor CacheLinqTest
> -
>
> Key: IGNITE-5532
> URL: https://issues.apache.org/jira/browse/IGNITE-5532
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ, Tests
> Fix For: 2.2
>
>
> Clean up unit tests for {{LINQ}} queries - break up into partial classes, 
> move to separate folder.



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


[jira] [Created] (IGNITE-5532) .NET: Clean up and refactor CacheLinqTest

2017-06-18 Thread Sergey Stronchinskiy (JIRA)
Sergey Stronchinskiy created IGNITE-5532:


 Summary: .NET: Clean up and refactor CacheLinqTest
 Key: IGNITE-5532
 URL: https://issues.apache.org/jira/browse/IGNITE-5532
 Project: Ignite
  Issue Type: Improvement
  Components: platforms
Reporter: Sergey Stronchinskiy
Assignee: Sergey Stronchinskiy
Priority: Minor
 Fix For: 2.2






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


[jira] [Assigned] (IGNITE-5442) .NET: LINQ Conditional statement will fail for some types

2017-06-15 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-5442:


Assignee: Sergey Stronchinskiy

> .NET: LINQ Conditional statement will fail for some types
> -
>
> Key: IGNITE-5442
> URL: https://issues.apache.org/jira/browse/IGNITE-5442
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.0
>Reporter: Sergey Stronchinskiy
>Assignee: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> Next code will fail:
> {code}
> var res = persons.Select(x => new {Foo = x.Key%2 == 0 ? 1 : (int?)null, 
> x.Value}).ToArray();
> {code}
> Fix: strip nullable type in {{SqlTypes}}



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


[jira] [Updated] (IGNITE-5442) .NET: LINQ Conditional statement will fail for some types

2017-06-14 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5442:
-
Affects Version/s: 2.0

> .NET: LINQ Conditional statement will fail for some types
> -
>
> Key: IGNITE-5442
> URL: https://issues.apache.org/jira/browse/IGNITE-5442
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.0
>Reporter: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> Next code will fail:
> {code}
> var res = persons.Select(x => new {Foo = x.Key%2 == 0 ? 1 : (int?)null, 
> x.Value}).ToArray();
> {code}
> Fix: strip nullable type in {{SqlTypes}}



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


[jira] [Updated] (IGNITE-5442) .NET: LINQ Conditional statement will fail for some types

2017-06-14 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-5442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy updated IGNITE-5442:
-
Labels: .NET LINQ  (was: .net linq)

> .NET: LINQ Conditional statement will fail for some types
> -
>
> Key: IGNITE-5442
> URL: https://issues.apache.org/jira/browse/IGNITE-5442
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Reporter: Sergey Stronchinskiy
>Priority: Minor
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> Next code will fail:
> {code}
> var res = persons.Select(x => new {Foo = x.Key%2 == 0 ? 1 : (int?)null, 
> x.Value}).ToArray();
> {code}
> Fix: strip nullable type in {{SqlTypes}}



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


[jira] [Commented] (IGNITE-4636) .NET: Support local collection joins in LINQ

2017-06-13 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16048373#comment-16048373
 ] 

Sergey Stronchinskiy commented on IGNITE-4636:
--

[~ptupitsyn],

Please take a look, I've committed few style fixes and launched build jobs 
again.

Current implementation supports joining with collections of "simple" types 
(which can be directly mapped to SQL types). The {{Join}} clause with local 
collections can be used in compiled query when the collection is constant (not 
passed as a parameter). When IGNITE-5404 will be fixed, local join should 
support collections passed as parameter to compiled query(with one limitation 
compared to other cases - subqueries will not be supported). Also local joins 
support left outer join via {{DefaultIfEmpty}} operator.

> .NET: Support local collection joins in LINQ
> 
>
> Key: IGNITE-4636
> URL: https://issues.apache.org/jira/browse/IGNITE-4636
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> LINQ {{IN}} clause is implemented in IGNITE-4425 and maps from 
> {{ICollection.Contains}}.
> However, {{IN}} has some limitations in Ignite, and better alternative is 
> temporary table join:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}persons.AsCacheQueryable().Join(new[] {1, 3}, p => p.Value.OrgId, x => 
> x, (p, x) => p);{code}



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


[jira] [Comment Edited] (IGNITE-5451) .NET: Improve outer joins in LINQ

2017-06-08 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16042690#comment-16042690
 ] 

Sergey Stronchinskiy edited comment on IGNITE-5451 at 6/8/17 1:28 PM:
--

As for me LINQ, method syntax you need to use in EF is too cumbersome, and not 
very obvious and I`ve seen some complaints about it.

 My proposal would be to add specific LINQ method for {{CacheQueryable}} like 
{{LeftOuterJoin(roles, person.Value.RoleId, role => role.Key,...)}}, may be 
alongside with implementing handling for {{GroupJoin}} (but not necessarily).

Also argument about LINQ to objects doesn't seem to me very relevant because 
LINQ to objects implementation has some design restrictions from language 
itself and OOP paradigm, so not all SQL query syntax can be  easily made 
compliant with it(and our main goal is to generate correct SQL). 


was (Author: gurustron):
As for me LINQ method syntax you need to use in EFis too cumbersome, and not 
very obvious and I`ve seen some complaints about it My proposal would be to add 
specific LINQ method for {{CacheQueryable}} like {{LeftOuterJoin(roles, 
person.Value.RoleId, role => role.Key,...)}} may be alongside with implementing 
handling for {{GroupJoin}}.

Also argument about LINQ to objects doesn't seem to me very relevant because 
LINQ to objects implementation has some design restrictions from language 
itself and OOP paradigm, so not all SQL query syntax can be  easily made 
compliant with it(and our main goal is to generate correct SQL). 

> .NET: Improve outer joins in LINQ
> -
>
> Key: IGNITE-5451
> URL: https://issues.apache.org/jira/browse/IGNITE-5451
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>  Labels: .NET, LINQ
> Fix For: 2.2
>
>
> Currently outer joins are supported in a convoluted way, via a regular join 
> with {{DefaultIfEmpty()}} call:
> {code}
> var res = persons.Join(roles.DefaultIfEmpty(),
> person => person.Value.RoleId, role => role.Key,...)
> {code}
> This is not consistent with LINQ to objects, Entity Framework and other 
> things out there, and unexpected for the users.
> Instead we should support {{GroupJoin}} properly, see 
> https://stackoverflow.com/questions/584820/how-do-you-perform-a-left-outer-join-using-linq-extension-methods



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


[jira] [Commented] (IGNITE-5451) .NET: Improve outer joins in LINQ

2017-06-08 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-5451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16042690#comment-16042690
 ] 

Sergey Stronchinskiy commented on IGNITE-5451:
--

As for me LINQ method syntax you need to use in EFis too cumbersome, and not 
very obvious and I`ve seen some complaints about it My proposal would be to add 
specific LINQ method for {{CacheQueryable}} like {{LeftOuterJoin(roles, 
person.Value.RoleId, role => role.Key,...)}} may be alongside with implementing 
handling for {{GroupJoin}}.

Also argument about LINQ to objects doesn't seem to me very relevant because 
LINQ to objects implementation has some design restrictions from language 
itself and OOP paradigm, so not all SQL query syntax can be  easily made 
compliant with it(and our main goal is to generate correct SQL). 

> .NET: Improve outer joins in LINQ
> -
>
> Key: IGNITE-5451
> URL: https://issues.apache.org/jira/browse/IGNITE-5451
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>  Labels: .NET, LINQ
> Fix For: 2.2
>
>
> Currently outer joins are supported in a convoluted way, via a regular join 
> with {{DefaultIfEmpty()}} call:
> {code}
> var res = persons.Join(roles.DefaultIfEmpty(),
> person => person.Value.RoleId, role => role.Key,...)
> {code}
> This is not consistent with LINQ to objects, Entity Framework and other 
> things out there, and unexpected for the users.
> Instead we should support {{GroupJoin}} properly, see 
> https://stackoverflow.com/questions/584820/how-do-you-perform-a-left-outer-join-using-linq-extension-methods



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


[jira] [Created] (IGNITE-5442) Linq Conditional statement will fail for some types

2017-06-07 Thread Sergey Stronchinskiy (JIRA)
Sergey Stronchinskiy created IGNITE-5442:


 Summary: Linq Conditional statement will fail for some types
 Key: IGNITE-5442
 URL: https://issues.apache.org/jira/browse/IGNITE-5442
 Project: Ignite
  Issue Type: Bug
  Components: platforms
Reporter: Sergey Stronchinskiy
Priority: Minor


Next code will fail:

{code}
var res = persons.Select(x => new {Foo = x.Key%2 == 0 ? 1 : (int?)null, 
x.Value}).ToArray();
{code}

Fix: strip nullable type in {{SqlTypes}}



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


[jira] [Commented] (IGNITE-4636) .NET: Support local collection joins in LINQ

2017-06-02 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16035004#comment-16035004
 ] 

Sergey Stronchinskiy commented on IGNITE-4636:
--

[~ptupitsyn],

Yes, it is one of the problems in implementation of join with local collections 
in compiled queries with collection passed as a parameter.

> .NET: Support local collection joins in LINQ
> 
>
> Key: IGNITE-4636
> URL: https://issues.apache.org/jira/browse/IGNITE-4636
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> LINQ {{IN}} clause is implemented in IGNITE-4425 and maps from 
> {{ICollection.Contains}}.
> However, {{IN}} has some limitations in Ignite, and better alternative is 
> temporary table join:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}persons.AsCacheQueryable().Join(new[] {1, 3}, p => p.Value.OrgId, x => 
> x, (p, x) => p);{code}



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


[jira] [Commented] (IGNITE-4636) .NET: Support local collection joins in LINQ

2017-06-02 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16034967#comment-16034967
 ] 

Sergey Stronchinskiy commented on IGNITE-4636:
--

[~ptupitsyn],

While working on this feature found that {{SqlFieldsQuery}} fails if it is 
passed collection of {{int}}'s instead of {{objects}}:

{code}
employeeCache.QueryFields(new SqlFieldsQuery("select p.name, p.salary from 
Employee p join table(id bigint = ?) i on p.organizationid = i.id"
, new object[] { new [] { 1, 3 } }));
{code}

> .NET: Support local collection joins in LINQ
> 
>
> Key: IGNITE-4636
> URL: https://issues.apache.org/jira/browse/IGNITE-4636
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.1
>
>
> LINQ {{IN}} clause is implemented in IGNITE-4425 and maps from 
> {{ICollection.Contains}}.
> However, {{IN}} has some limitations in Ignite, and better alternative is 
> temporary table join:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}persons.AsCacheQueryable().Join(new[] {1, 3}, p => p.Value.OrgId, x => 
> x, (p, x) => p);{code}



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


[jira] [Created] (IGNITE-4926) .NET: Join fails in LINQ when subquery is using Select clause

2017-04-06 Thread Sergey Stronchinskiy (JIRA)
Sergey Stronchinskiy created IGNITE-4926:


 Summary: .NET: Join fails in LINQ when subquery is using Select 
clause
 Key: IGNITE-4926
 URL: https://issues.apache.org/jira/browse/IGNITE-4926
 Project: Ignite
  Issue Type: Bug
  Components: platforms
Reporter: Sergey Stronchinskiy
Priority: Minor


Using {{Join}} with subquery works when subquery does not contain {{Select}} 
clause:

{code}
var persons = GetPersonCache().AsCacheQueryable().Where(x => x.Key >= 0);
var orgs = GetOrgCache().AsCacheQueryable().Where(x => x.Key > 10);
var res = persons.Join(orgs,
p => p.Value.OrganizationId,
o => o.Value.Id, (p, o) => p)
.Where(x => x.Key >= 0)
.ToList();
{code}

And fails when subquery is using {{Select}}:

{code}
var res = persons
.Join(
orgs.Where(orgEntry => orgEntry.Value.Name == "Org_1")
.Select(orgEntry => orgEntry.Key),
e => e.Value.OrganizationId,
i => i,
(e, i) => e)
.ToList();
{code}

Exception:
{code}
Failed to parse SQL query: select _T0._key, _T0._val from "".Person as _T0 
inner join (select _T1._key from "".Organization as _T1 where (_T1._key > ?) 
and (_T1.Name = ?) ) as _T2 on (_T2._key, _T2._val = _T0.OrganizationId) where 
(_T0._key >= ?)
Caused by: org.h2.jdbc.JdbcSQLException: Column "_T2._VAL" not found;
{code}

This can be reproduced in {{CacheLinqTest.TestSubqueryJoin}} by adding next:

{code}
var foo = persons
.Join(
orgs.Where(orgEntry => orgEntry.Value.Name == "Org_1")
.Select(orgEntry => orgEntry.Key),
e => e.Value.OrganizationId,
i => i,
(e, i) => e)
.ToArray();
{code}

or

{code}
var foo = orgs
.Where(orgEntry => orgEntry.Value.Name == "Org_1")
.Select(orgEntry => orgEntry.Key);
var bar = persons
.Join(foo, e => e.Value.OrganizationId, i => i, (e, i) => e)
.ToArray();
{code}



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


[jira] [Assigned] (IGNITE-4817) .NET: Contains fails in LINQ when subquery comes from a variable

2017-03-14 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-4817:


Assignee: Sergey Stronchinskiy

> .NET: Contains fails in LINQ when subquery comes from a variable
> 
>
> Key: IGNITE-4817
> URL: https://issues.apache.org/jira/browse/IGNITE-4817
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 1.9
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.0
>
>
> Using Contains with subquery works when subquery is inline:
> {code}
> var res = personsQry.Where(x => orgsQry.Where(o => o.Value.Size < 
> 10).Select(o => o.Key).Contains(x.Value.OrgId));
> {code}
> And fails when extracted into a variable:
> {code}
> var orgIds = orgsQry.Where(o => o.Value.Size < 10).Select(o => o.Key);
>   
> var res = personsQry.Where(x => orgIds.Contains(x.Value.OrgId));
> {code}
> Exception:
> {code}
> Failed to parse query: select _T0._key, _T0._val from "persons-linq".Person 
> as _T0 where (_T0.OrgId IN (select _T1._key, _T1._val from 
> "orgs-linq".Organization as _T1 ))
> {code}
> This can be reproduced in {{CacheLinqTest.TestContains}} by extracting a 
> variable:
> {code}
> var foo = orgCache
>   .Where(orgEntry => orgEntry.Value.Name == "Org_1")
>   .Select(orgEntry => orgEntry.Key);
> {code}



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


[jira] [Assigned] (IGNITE-4636) .NET: Support local collection joins in LINQ

2017-02-10 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-4636:


Assignee: Sergey Stronchinskiy

> .NET: Support local collection joins in LINQ
> 
>
> Key: IGNITE-4636
> URL: https://issues.apache.org/jira/browse/IGNITE-4636
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.0
>
>
> LINQ {{IN}} clause is implemented in IGNITE-4425 and maps from 
> {{ICollection.Contains}}.
> However, {{IN}} has some limitations in Ignite, and better alternative is 
> temporary table join:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}persons.AsCacheQueryable().Join(new[] {1, 3}, p => p.Value.OrgId, x => 
> x, (p, x) => p);{code}



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


[jira] [Comment Edited] (IGNITE-4425) .NET: Support "ICollection.Contains" in LINQ

2017-02-02 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15847276#comment-15847276
 ] 

Sergey Stronchinskiy edited comment on IGNITE-4425 at 2/2/17 4:39 PM:
--

Hi,

After investigating the issue I think the best way to implement 
"Array.Contains" is directly translating it to "IN (?,?,?)" cause:

1.  It is the most direct and expected mapping
2. Also there are some possible queries that can not be that easily translated 
to "JOIN" clause (for example: .Where(entry => keys.Contains(entry.entry.Key) 
|| _SomeBooleanCondition_))

So i would like to implement it that way in conjunction with enabling 
"Enumerable.Join" with local collections.



was (Author: gurustron):
Hi,

After investigating the issue I think the best way to implement 
"Array.Contains" is directly translating it to "IN (?,?,?)" cause:

1.  It is the most direct and expected mapping
2. Also there are some possible queries that can not be that easily translated 
to "JOIN" clause (for example: .Where(entry => keys.Contains(entry.entry.Key) 
|| _SomeBooleanCondition_))

So my i would like to implement it that way in conjunction with enabling 
"Enumerable.Join" with local collections.


> .NET: Support "ICollection.Contains" in LINQ
> 
>
> Key: IGNITE-4425
> URL: https://issues.apache.org/jira/browse/IGNITE-4425
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.0
>
>
> SQL supports IN queries
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p where id in (?, ?)", 1, 3);
> {code}
> Add support in LINQ like this:
> {code}
> persons.AsCacheQueryable().Where(x => new[] {1,3}.Contains(x.Value.Id))
> {code}



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


[jira] (IGNITE-4425) .NET: Support "Array.Contains" in LINQ

2017-01-31 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15847276#comment-15847276
 ] 

Sergey Stronchinskiy commented on IGNITE-4425:
--

Hi,

After investigating the issue I think the best way to implement 
"Array.Contains" is directly translating it to "IN (?,?,?)" cause:

1.  It is the most direct and expected mapping
2. Also there are some possible queries that can not be that easily translated 
to "JOIN" clause (for example: .Where(entry => keys.Contains(entry.entry.Key) 
|| _SomeBooleanCondition_))

So my i would like to implement it that way in conjunction with enabling 
"Enumerable.Join" with local collections.


> .NET: Support "Array.Contains" in LINQ
> --
>
> Key: IGNITE-4425
> URL: https://issues.apache.org/jira/browse/IGNITE-4425
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.0
>
>
> SQL supports IN queries and, as a better alternative, temporary table join, 
> as described in the docs:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}
> persons.AsCacheQueryable().Where(x => new[] {1,3}.Contains(x.Value.OrgId))
> {code}



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


[jira] [Assigned] (IGNITE-4425) .NET: Support "Array.Contains" in LINQ

2017-01-16 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-4425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-4425:


Assignee: Sergey Stronchinskiy

> .NET: Support "Array.Contains" in LINQ
> --
>
> Key: IGNITE-4425
> URL: https://issues.apache.org/jira/browse/IGNITE-4425
> Project: Ignite
>  Issue Type: Improvement
>  Components: platforms
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>  Labels: .NET, LINQ
> Fix For: 2.0
>
>
> SQL supports IN queries and, as a better alternative, temporary table join, 
> as described in the docs:
> https://apacheignite.readme.io/docs/sql-performance-and-debugging#sql-performance-and-usability-considerations
> Example SQL:
> {code}
> new SqlFieldsQuery("select p.name from Person p join table(id bigint = ?) i 
> on p.OrgId = i.id", new object[] { new object[] {1,3}})
> {code}
> Add support in LINQ like this:
> {code}
> persons.AsCacheQueryable().Where(x => new[] {1,3}.Contains(x.Value.OrgId))
> {code}



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


[jira] [Commented] (IGNITE-4412) .NET: NLogLoggerTest is not thread safe

2017-01-05 Thread Sergey Stronchinskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/IGNITE-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15802172#comment-15802172
 ] 

Sergey Stronchinskiy commented on IGNITE-4412:
--

Team City looks good: 
http://ci.ignite.apache.org/viewLog.html?buildId=410551=buildResultsDiv=IgniteTests_IgnitePlatformNet

> .NET: NLogLoggerTest is not thread safe
> ---
>
> Key: IGNITE-4412
> URL: https://issues.apache.org/jira/browse/IGNITE-4412
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Trivial
>  Labels: .NET, newbie
> Fix For: 2.0
>
>
> NLog.Targets.MemoryTarget is not thread safe, the test can sometimes fail. 
> Replace this target with our own synchronized implementation.



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


[jira] [Assigned] (IGNITE-4412) .NET: NLogLoggerTest is not thread safe

2017-01-05 Thread Sergey Stronchinskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-4412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Stronchinskiy reassigned IGNITE-4412:


Assignee: Sergey Stronchinskiy

> .NET: NLogLoggerTest is not thread safe
> ---
>
> Key: IGNITE-4412
> URL: https://issues.apache.org/jira/browse/IGNITE-4412
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 1.8
>Reporter: Pavel Tupitsyn
>Assignee: Sergey Stronchinskiy
>Priority: Trivial
>  Labels: .NET, newbie
> Fix For: 2.0
>
>
> NLog.Targets.MemoryTarget is not thread safe, the test can sometimes fail. 
> Replace this target with our own synchronized implementation.



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