On Sun, Jan 23, 2011 at 11:23 AM, ruslan usifov <ruslan.usi...@gmail.com> wrote:
>
>
>
>> On Sun, Jan 23, 2011 at 6:30 AM, ruslan usifov <ruslan.usi...@gmail.com>
>> wrote:
>>
>> Right. The difference is that the gossip process builds a topology of
>> UP/DOWN hosts so Unavailable is thrown quickly. If you need ALL and
>> one replica is known down -> Unavailable.
>>
>
> Is it possible to detect that write doesn't happen anywhere? Or it is only
> possible detect consistency failure?
>

Regardless of what Exception is thrown you should retry the write from
your client.

If the method threw UnavailableException the write operation did not
happen on any node. As the coordinator judged that it would have not
succeeded.

If the method threw TimedOutException the write could have succeeded
on some nodes but it was not acknowledged on enough to meet the CL
your requested.

It would be nice if the exception could be populated more information such as
TimedOutException:
  requested: 3
  succeeded: 1
  succeededList: 127.0.0.1
  requestedList: 127.0.0.1,127.0.0.2,127.0.0.3

This would make the explanations more self explanatory, and would give
more transparency to the clients.

(knowing my luck thrift probably does not allow complex exception types)

Reply via email to