You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Paul Joseph Davis (JIRA)" <ji...@apache.org> on 2011/04/21 01:35:05 UTC
[jira] [Created] (COUCHDB-1134) Bug in database size calculation
Bug in database size calculation
--------------------------------
Key: COUCHDB-1134
URL: https://issues.apache.org/jira/browse/COUCHDB-1134
Project: CouchDB
Issue Type: Bug
Affects Versions: 1.2
Reporter: Paul Joseph Davis
Noticed these backtraces while poking at something else. Haven't even peeped the code so I've got no idea if its trivial. These are also old databases.
[error] [<0.120.0>] Uncaught error in HTTP request: {error,badarith}
[info] [<0.120.0>] Stacktrace: [{couch_db,db_data_size,3},
{couch_db,get_db_info,1},
{couch_httpd_db,db_req,2},
{couch_httpd_db,do_db_req,2},
{couch_httpd,handle_request_int,5},
{mochiweb_http,headers,5},
{proc_lib,init_p_do_apply,3}]
[info] [<0.120.0>] 127.0.0.1 - - GET /foo 500
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1134) Bug in database size calculation
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022546#comment-13022546 ]
Filipe Manana commented on COUCHDB-1134:
----------------------------------------
Good finding Paul. This missing clause should fix it:
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index ed72bb6..7952366 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -281,6 +281,8 @@ db_data_size(_, nil, _) ->
db_data_size(_, _, {_Count, _DelCount}) ->
% pre 1.2 format, upgraded on compaction
null;
+db_data_size(_, _, {_Count, _DelCount, nil}) ->
+ null;
db_data_size(SeqBtreeSize, IdBtreeSize, {_Count, _DelCount, DocAndAttsSize}) ->
SeqBtreeSize + IdBtreeSize + DocAndAttsSize.
> Bug in database size calculation
> --------------------------------
>
> Key: COUCHDB-1134
> URL: https://issues.apache.org/jira/browse/COUCHDB-1134
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Paul Joseph Davis
>
> Noticed these backtraces while poking at something else. Haven't even peeped the code so I've got no idea if its trivial. These are also old databases.
> [error] [<0.120.0>] Uncaught error in HTTP request: {error,badarith}
> [info] [<0.120.0>] Stacktrace: [{couch_db,db_data_size,3},
> {couch_db,get_db_info,1},
> {couch_httpd_db,db_req,2},
> {couch_httpd_db,do_db_req,2},
> {couch_httpd,handle_request_int,5},
> {mochiweb_http,headers,5},
> {proc_lib,init_p_do_apply,3}]
> [info] [<0.120.0>] 127.0.0.1 - - GET /foo 500
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (COUCHDB-1134) Bug in database size calculation
Posted by "Filipe Manana (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filipe Manana resolved COUCHDB-1134.
------------------------------------
Resolution: Fixed
Fix Version/s: 1.2
Fixed in trunk
> Bug in database size calculation
> --------------------------------
>
> Key: COUCHDB-1134
> URL: https://issues.apache.org/jira/browse/COUCHDB-1134
> Project: CouchDB
> Issue Type: Bug
> Affects Versions: 1.2
> Reporter: Paul Joseph Davis
> Fix For: 1.2
>
>
> Noticed these backtraces while poking at something else. Haven't even peeped the code so I've got no idea if its trivial. These are also old databases.
> [error] [<0.120.0>] Uncaught error in HTTP request: {error,badarith}
> [info] [<0.120.0>] Stacktrace: [{couch_db,db_data_size,3},
> {couch_db,get_db_info,1},
> {couch_httpd_db,db_req,2},
> {couch_httpd_db,do_db_req,2},
> {couch_httpd,handle_request_int,5},
> {mochiweb_http,headers,5},
> {proc_lib,init_p_do_apply,3}]
> [info] [<0.120.0>] 127.0.0.1 - - GET /foo 500
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira