Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-08-13 Thread Ilya Kasnacheev
; Stan > > > > From: Nikolay Izhikov > > Sent: 24 июля 2018 г. 16:27 > > To: dev@ignite.apache.org > > Subject: Re: ConcurrentLinkedHashMap works incorrectly after clear() > > > > Hello, Ilya. > > > > May be we need to proceed with ticket [1]

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-08-10 Thread Andrey Gura
should be OK). > > Stan > > From: Nikolay Izhikov > Sent: 24 июля 2018 г. 16:27 > To: dev@ignite.apache.org > Subject: Re: ConcurrentLinkedHashMap works incorrectly after clear() > > Hello, Ilya. > > May be we need to proceed with ticket [1] "Get rid of > org.

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-08-09 Thread Dmitriy Setrakyan
On Thu, Aug 9, 2018 at 8:16 AM, Alexey Goncharuk wrote: > Guys, I think we can definitely change current implementation of CLHM with > a more stable one, but as a temporal solution I see nothing wrong with > throwing an UnsupportedOperationException from clear() method. Ilya already > provided a

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-08-09 Thread Alexey Goncharuk
lya Lantukh. But I > can > > > > > mistake here. > > > > > > > > > > In general way, I think it's a good case to start thinking about > how > > to > > > > get > > > > > rid of CLHM. E.g. we can consider thi

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-27 Thread Anton Vinogradov
[1]. > > > > > > > > [1] https://github.com/ben-manes/concurrentlinkedhashmap > > > > > > > > вт, 24 июл. 2018 г. в 16:45, Stanislav Lukyanov < > > stanlukya...@gmail.com > > > >: > > > > > > > > > It see

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-27 Thread Ilya Kasnacheev
t; >: > > > > > > > It seems that we currently use the CLHM primarily as a FIFO cache. > > > > I see two ways around that. > > > > > > > > First, we could implement such LRU/FIFO cache based on another, > > properly > > >

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-27 Thread Maxim Muzafarov
aft implementation of > > > LruEvictionPolicy based on it that passes functional tests, > > > but I haven’t benchmarked it yet. > > > > > > Second, Guava has a Cache API with a lot of configuration options that > we > > > could use (license i

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-25 Thread Ilya Kasnacheev
nse is Apache, should be OK). > > > > Stan > > > > From: Nikolay Izhikov > > Sent: 24 июля 2018 г. 16:27 > > To: dev@ignite.apache.org > > Subject: Re: ConcurrentLinkedHashMap works incorrectly after clear() > > > > Hello, Ilya. > > > > May b

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-25 Thread Maxim Muzafarov
tional tests, > but I haven’t benchmarked it yet. > > Second, Guava has a Cache API with a lot of configuration options that we > could use (license is Apache, should be OK). > > Stan > > From: Nikolay Izhikov > Sent: 24 июля 2018 г. 16:27 > To: dev@ignite.apache.org > Subj

RE: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-24 Thread Stanislav Lukyanov
: ConcurrentLinkedHashMap works incorrectly after clear() Hello, Ilya. May be we need to proceed with ticket [1] "Get rid of org.jsr166.ConcurrentLinkedHashMap"? Especially, if this class is broken and buggy. [1] https://issues.apache.org/jira/browse/IGNITE-7516 В Вт, 24/07/2018 в 16:20 +0300, Il

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-24 Thread Nikolay Izhikov
Hello, Ilya. May be we need to proceed with ticket [1] "Get rid of org.jsr166.ConcurrentLinkedHashMap"? Especially, if this class is broken and buggy. [1] https://issues.apache.org/jira/browse/IGNITE-7516 В Вт, 24/07/2018 в 16:20 +0300, Ilya Lantukh пишет: > Thanks for revealing this issue! >

Re: ConcurrentLinkedHashMap works incorrectly after clear()

2018-07-24 Thread Ilya Lantukh
Thanks for revealing this issue! I don't understand why should we disallow calling clear(). One way how it can be re-implemented is: 1. acquire write locks on all segments; 2. clear them; 3. reset size to 0; 4. release locks. Another approach is to calculate inside ConcurrentLinkedHashMap.Segmen