samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Pan (Data Infrastructure)" <yi...@linkedin.com>
Subject Re: Review Request 40106: SAMZA-812 CachedStore flushes too often
Date Wed, 11 Nov 2015 16:30:35 GMT


> On Nov. 11, 2015, 7:31 a.m., Yi Pan (Data Infrastructure) wrote:
> > samza-kv/src/test/scala/org/apache/samza/storage/kv/TestCachedStore.scala, line
37
> > <https://reviews.apache.org/r/40106/diff/1/?file=1120744#file1120744line37>
> >
> >     question: so, here by preserving the old behavior for array keys, the end result
is that the array keys would be immediately flushed out to the store as they are today, right?
Wouldn't it be nicer to fix the CachedStore's cache hit issue w/ array keys s.t. array keys
and other primitive type of keys behave the same?
> 
> Tommy Becker wrote:
>     I think boxed primitives will work ok as is since they have sane equals/hashCode
methods; arrays don't. See https://issues.apache.org/jira/browse/SAMZA-505 for background
on the current behavior. In short, we could special case arrays, but they thought it would
be better to just call out the semantics of the cache more loudly.

Yes. Thanks for digging up the history on this issue. Sounds reasonable.


- Yi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40106/#review106023
-----------------------------------------------------------


On Nov. 9, 2015, 9:30 p.m., Tommy Becker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40106/
> -----------------------------------------------------------
> 
> (Updated Nov. 9, 2015, 9:30 p.m.)
> 
> 
> Review request for samza.
> 
> 
> Bugs: SAMZA-812
>     https://issues.apache.org/jira/browse/SAMZA-812
> 
> 
> Repository: samza
> 
> 
> Description
> -------
> 
> Fix for SAMZA-812. Only flush CachedStore when necessary, with the exception that this
preserves the buggy flush behavior for array keys. Otherwise the store will not behave properly
for array keys due to the mismatch between the reference semantics of the cache vs the value
semantics of the store. See the bug for details.
> 
> 
> Diffs
> -----
> 
>   samza-kv/src/main/scala/org/apache/samza/storage/kv/CachedStore.scala 1112350 
>   samza-kv/src/test/scala/org/apache/samza/storage/kv/TestCachedStore.scala cc9c9f3 
> 
> Diff: https://reviews.apache.org/r/40106/diff/
> 
> 
> Testing
> -------
> 
> Unit tested
> 
> 
> Thanks,
> 
> Tommy Becker
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message