seyyed / scalaris

Automatically exported from code.google.com/p/scalaris
Apache License 2.0
0 stars 0 forks source link

Error when sending empty TLog and want to commit #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call cs_api_v2:process_request_list([], [{commit}]).

What is the expected output? What do you see instead?
Expected:
{[], {results, [commit]}}.

See:
** exception error: bad argument
     in function  cs_api_v2:'-process_request_list/2-lc$^1/1-1-'/1
     in call from cs_api_v2:process_request_list/2

What version of the product are you using? On what operating system?
latest svn, linux.

Please provide any additional information below.

The case, that a user just sends an empty TLog with a commit leads to an 
application error. Maybe this case should be handled. I propose adding this 
simple fix:

src/transactions/rdht_tx.erl,30:
...
+++ process_request_list([], [{commit}]) ->
+++     {[], {results, [{commit}]}};
process_request_list([], [SingleReq]) ->
...

Original issue reported on code.google.com by Uwe.Daue...@gmail.com on 26 Apr 2010 at 2:41

GoogleCodeExporter commented 8 years ago
Thx. see r728

Original comment by schu...@gmail.com on 26 Apr 2010 at 3:50