Permalink
Browse files

Do not error-log on busy cassandra connection.

It means that there is no available connection at the moment,
and it happens all the time.
  • Loading branch information...
1 parent 22f75e2 commit b606c05de09dfdad7fe175fdb4d00a0e97de2034 @cheng81 cheng81 committed Jul 17, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/cassanderl.erl
View
@@ -166,8 +166,13 @@ get_slice_retry(Config, Key, ColumnParent, SliceRange, Consistency) ->
{ok, Res};
{error, enomem} ->
{error, enomem};
+ {error, busy} ->
+ % do not error on "busy": it happens all the time
+ % besides, we are not really that interested in this error:
+ % it just means that there are no available cassandra connection atm
+ timer:sleep(100),
+ get_slice_retry(Config, Key, ColumnParent, SliceRange, Consistency);
{error, Err} when
- Err == busy orelse
Err == econnrefused orelse
Err == closed ->
error_logger:info_msg("Cassandra connection error ~p",[Err]),

0 comments on commit b606c05

Please sign in to comment.