GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/932

    TINKERPOP-2033 Maintain order in profile() annotations

    https://issues.apache.org/jira/browse/TINKERPOP-2033
    
    Used a synchronized map around a `LinkedHashMap` rather than 
`ConcurrentHashMap`. Not expecting a performance issue with this as its for 
`profile()` step which doesn't have to be "fast" necessarily as it is a 
debugging step. 
    
    Tested manually for backward compatibility across a number of different 
versions. That was quite time consuming because I'd not realized that the we'd 
introduced a perhaps unintended break between 3.3.0 and 3.2.x when it comes to 
"metrics" serialization in Gryo 1.0. Ultimately, I should have just accepted 
the output i was seeing in the IO tests as being correct in terms of what the 
compatibility was.
    
    Note that while the Gryo 1.0 test file changed for 3.4.0 it still remains 
compatible with previous versions - there is just a different representation of 
a {{Map}} in the binary. All of this seems somehow a  non-issue because Gryo 
3.0 has been the default since 3.3.0 released.
    
    VOTE +1

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

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-2033

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

    https://github.com/apache/tinkerpop/pull/932.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 #932
    
----
commit 788bf8703488f02ed1a609c6d2abf56cc4c24b3f
Author: Stephen Mallette <spmva@...>
Date:   2018-09-11T16:44:07Z

    TINKERPOP-2033 Maintain order in profile() annotations
    
    Used a synchronized map around a LinkedHashMap rather than 
ConcurrentHashMap. Not expecting a performance issue with this as its for 
profile() step which doesn't have to be "fast" per se as it is a debugging 
step. Affected gryo more than graphson - specifically gryo 1.0 which didn't 
coerce "metrics" to an interfaces as it does in 3.0. Added a custom serializer 
to force the annotations to a regular LinkedHashMap and then back to 
synchronized LinkedHashMap during serder to keep compatibility.

----


---

Reply via email to