ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-6354) .NET: DataStreamer does not work with complex object graphs
Date Tue, 12 Sep 2017 12:52:00 GMT

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

Pavel Tupitsyn updated IGNITE-6354:
-----------------------------------
    Description: 
Same issue as IGNITE-6081 with {{PutAll}}: {{DataStreamer}} does not detach objects.

Reproducer:

{code}
var obj1 = new Container();
var obj2 = new Container();
var obj3 = new Container();
var obj4 = new Container();

obj1.Inner = obj2;
obj2.Inner = obj1;
obj3.Inner = obj1;
obj4.Inner = obj3;

using (var ldr = _grid.GetDataStreamer<int, Container>(CacheName))
{
    ldr.AllowOverwrite = true;

    ldr.AddData(1, obj1);
    ldr.AddData(2, obj2);
    ldr.AddData(3, obj3);
    ldr.AddData(4, obj4);
}

var cache = _grid.GetCache<int, Container>(CacheName);

var res = cache[1];
Assert.AreEqual(res, res.Inner.Inner);

Assert.IsNotNull(cache[2].Inner);
Assert.IsNotNull(cache[2].Inner.Inner);
Assert.IsNotNull(cache[3].Inner);
Assert.IsNotNull(cache[3].Inner.Inner);
            
Assert.IsNotNull(cache[4].Inner);
Assert.IsNull(cache[4].Inner.Inner);
{code}

  was:
Same issue as IGNITE-6081 with {{PutAll}}: {{DataStreamer}} does not detach objects.

Reproducer:

{code}
            var obj1 = new Container();
            var obj2 = new Container();
            var obj3 = new Container();
            var obj4 = new Container();

            obj1.Inner = obj2;
            obj2.Inner = obj1;
            obj3.Inner = obj1;
            obj4.Inner = obj3;

            using (var ldr = _grid.GetDataStreamer<int, Container>(CacheName))
            {
                ldr.AllowOverwrite = true;

                ldr.AddData(1, obj1);
                ldr.AddData(2, obj2);
                ldr.AddData(3, obj3);
                ldr.AddData(4, obj4);
            }

            var cache = _grid.GetCache<int, Container>(CacheName);

            var res = cache[1];
            Assert.AreEqual(res, res.Inner.Inner);

            Assert.IsNotNull(cache[2].Inner);
            Assert.IsNotNull(cache[2].Inner.Inner);
            Assert.IsNotNull(cache[3].Inner);
            Assert.IsNotNull(cache[3].Inner.Inner);
            
            Assert.IsNotNull(cache[4].Inner);
            Assert.IsNull(cache[4].Inner.Inner);

{code}


> .NET: DataStreamer does not work with complex object graphs
> -----------------------------------------------------------
>
>                 Key: IGNITE-6354
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6354
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>              Labels: .NET
>             Fix For: 2.3
>
>
> Same issue as IGNITE-6081 with {{PutAll}}: {{DataStreamer}} does not detach objects.
> Reproducer:
> {code}
> var obj1 = new Container();
> var obj2 = new Container();
> var obj3 = new Container();
> var obj4 = new Container();
> obj1.Inner = obj2;
> obj2.Inner = obj1;
> obj3.Inner = obj1;
> obj4.Inner = obj3;
> using (var ldr = _grid.GetDataStreamer<int, Container>(CacheName))
> {
>     ldr.AllowOverwrite = true;
>     ldr.AddData(1, obj1);
>     ldr.AddData(2, obj2);
>     ldr.AddData(3, obj3);
>     ldr.AddData(4, obj4);
> }
> var cache = _grid.GetCache<int, Container>(CacheName);
> var res = cache[1];
> Assert.AreEqual(res, res.Inner.Inner);
> Assert.IsNotNull(cache[2].Inner);
> Assert.IsNotNull(cache[2].Inner.Inner);
> Assert.IsNotNull(cache[3].Inner);
> Assert.IsNotNull(cache[3].Inner.Inner);
>             
> Assert.IsNotNull(cache[4].Inner);
> Assert.IsNull(cache[4].Inner.Inner);
> {code}



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

Mime
View raw message