[ 
https://issues.apache.org/jira/browse/COUCHDB-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14184302#comment-14184302
 ] 

Robert Newson commented on COUCHDB-2406:
----------------------------------------

The values are derived as the sum of the values from one copy of each shard 
range. There are three copies of each by default, which are each slightly 
different values, hence the unstable response. Suggestions welcome, though note 
we don't really want to require an answer from every copy of every shard.

> Unstable database sizes and update_seq values
> ---------------------------------------------
>
>                 Key: COUCHDB-2406
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2406
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: Alexander Shorin
>
> Each time requesting database info CouchDB 2.0 return different information 
> about database sizes and update seq while there is no any activity for 
> monitored database.
> Script to reproduce:
> {code}
> import requests
> import time
> dburl = 'http://localhost:15984/test'
> init_dbinfo = requests.get(dburl).json()
> diff_found = False
> while True:
>     dbinfo = requests.get(dburl).json()
>     for key, value in sorted(dbinfo.items()):
>         if dbinfo[key] != init_dbinfo[key]:
>             diff_found = True
>             print(key)
>             print('was:', init_dbinfo[key])
>             print('now:', dbinfo[key])
>             print('-' * 20)
>     if diff_found:
>         break
>     time.sleep(1)
> {code}
> Example output:
> {code}
> data_size
> was: 25807939
> now: 25808590
> --------------------
> disk_size
> was: 71333328
> now: 71329232
> --------------------
> sizes
> was: {'external': 0, 'file': 71333328, 'active': 25807939}
> now: {'external': 0, 'file': 71329232, 'active': 25808590}
> --------------------
> update_seq
> was: [59238, 
> 'g1AAAAFbeJzLYWBg4MhgTmHgz8tPSTV2MDQy1zMAQsMcoARTIkOS_P___7OSGBhkeuCqDNFUJSkAySR7mMKLuBU6gBTGwxRuwa0wAaSwHqbwJ06FeSxAkqEBSAHVzgcplpUmoHgBRPF-sOLZBBQfgCi-D1bMjDOcIIofQBRD3Lw4CwAxnFvL']
> now: [59238, 
> 'g1AAAAFbeJzLYWBg4MhgTmHgz8tPSTV0MDQy1zMAQsMcoARTIkOS_P___7OSGBhkenCqSlIAkkn2MIUXcSt0ACmMhyncglthAkhhPUzhT5wK81iAJEMDkAKqnQ9SLCtNQPECiOL9YMWzCSg-AFF8H6yYmYDiBxDFEDcvzgIALrhbxw']
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to