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

Andrey N. Gura commented on IGNITE-12646:
-----------------------------------------

[~sergey-chugunov] It seems that solution is too complex while problem is 
pretty simple.

New system property is a bad idea from my point of view. It isn't obvious for 
end user. Also fix hides the problem but doesn't fix it.

I think that better solution is just  change order of two lines of code: first 
log the message and after it put message to processing queue.

WDYT?

> When DEBUG mode is enabled GridToStringBuilder may throw 
> java.util.ConcurrentModificationException
> --------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-12646
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12646
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Sergey Chugunov
>            Assignee: Sergey Chugunov
>            Priority: Major
>             Fix For: 2.9
>
>
> With DEBUG enabled many components like CommunicationSPI start to log much 
> larger chunks of information e.g. communication messages are logged as is.
> When big enough message with non-thread safe collection inside is logged by 
> communication thread it is possible that some other thread started processing 
> the same message. If processing involves modifying of the collection 
> communication thread will get ConcurrentModificationException when in the 
> middle of iterating over it.
> GridToStringBuilder should be safe from throwing this exception and 
> (optionally) any type of RuntimeException.



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

Reply via email to