You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/10 21:45:00 UTC

[jira] [Commented] (IGNITE-9209) GridDistributedTxMapping.toString() returns broken string

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

ASF GitHub Bot commented on IGNITE-9209:
----------------------------------------

GitHub user SomeFire opened a pull request:

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

    IGNITE-9209: GridDistributedTxMapping.toString() returns broken string

    

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

    $ git pull https://github.com/SomeFire/ignite ignite-9209

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

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

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

    This closes #4519
    
----
commit 9d0f4853e9b179553631866b57cba8d393328be8
Author: Dmitrii Ryabov <so...@...>
Date:   2018-08-10T21:41:53Z

    IGNITE-9209: GridDistributedTxMapping.toString() returns broken string

----


> GridDistributedTxMapping.toString() returns broken string
> ---------------------------------------------------------
>
>                 Key: IGNITE-9209
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9209
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Ryabov Dmitrii
>            Priority: Minor
>
> Something wrong with `GridDistributedTxMapping` when we try to get string representation by `GridToStringBuilder`.
> It should looks like
> {noformat}
> GridDistributedTxMapping [entries=LinkedHashSet [/*values here*/], explicitLock=false, dhtVer=null, last=false, nearEntries=0,/*more text*/]
> {noformat}
> But currently it looks like
> {noformat}
> KeyCacheObjectImpl [part=1, val=1, hasValBytes=false]KeyCacheObjectImpl [part=1, val=1, hasValBytes=false],// more text
> {noformat}
> Reproducer:
> {code:java}
> public class GridToStringBuilderSelfTest extends GridCommonAbstractTest {
>     /**
>      * @throws Exception
>      */
>     public void testGridDistributedTxMapping() throws Exception {
>         IgniteEx ignite = startGrid(0);
>         IgniteCache<Integer, Integer> cache = ignite.createCache(defaultCacheConfiguration());
>         try (Transaction tx = ignite.transactions().txStart()) {
>             cache.put(1, 1);
>             GridDistributedTxMapping mapping = new GridDistributedTxMapping(grid(0).localNode());
>             assertTrue("Wrong string: " + mapping, mapping.toString().startsWith("GridDistributedTxMapping ["));
>             mapping.add(((TransactionProxyImpl)tx).tx().txState().allEntries().stream().findAny().get());
>             assertTrue("Wrong string: " + mapping, mapping.toString().startsWith("GridDistributedTxMapping ["));
>         }
>         stopAllGrids();
>     }
> {code}



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