Hi Alfonso,

so, thanks for your answers :)
I will try to read about beans a bit in the future, my java knowledge
is just so limited :/

On Fri, Mar 8, 2013 at 9:46 AM, Alfonso Nishikawa
<[email protected]> wrote:
>>> Anyway, this does not seems to be the problem shown in NUTCH-1534.
>>> I think that the problem in NUTCH-1534 what you told about multiple
>>> threads. CassandraClient is not reentrant because Mutator is not
>>> reentrant, so must be used only with 1 thread. Could you, please, try
>>> this?:
>>>
>>> * Update to gora-0.2.1
>>> * Modify CassandraStore:340 so the line reads as this:
>>>
>>>  private synchronized void addOrUpdateField(K key, Field field, Object 
>>> value) {
>>>
>>> The same should be for gora-0.2 (at CassandraStore:301), but I like
>>> 0.2.1 and patches must be for /trunk (desirable).
>>>
>>> Maybe I am wrong, but please, give it a shot :)
>>
>> Yeah, there are several different approaches to get this accomplished.
>> For what I recall from GORA-211, Roland suggested creating a lock
>> object and just synchronizing at the read/write/update operation time,
>> but we would have to evaluate if it causes any performance damage to
>> synchronize the whole encapsulating method.
>
> You are right. That was the fastest I found and short (only 1 word!)
> fix to check.
>
> The real fix is:
>
> * Modify HectorUtils.java:
> - change all "public static<K> void insertSubColumn..." to "public
> syncronized static<K>..." (3 changes)
> - change "public static<K> void deleteSubColumn" to " public
> syncronized static<K> void deleteSubColumn" (1 change)
>
> And then you are just synchronizing the calls to the mutator.

Yes, now I think this, too.
And I think we should really use ->addInsertation (or make it useable
for CassandraStore) instead of ->insert ... this gives a real
performance boost.

--Roland

Reply via email to