You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/06/04 16:35:53 UTC

[GitHub] [couchdb] nickva opened a new pull request #2926: Include database uuid in db info result

nickva opened a new pull request #2926:
URL: https://github.com/apache/couchdb/pull/2926


   As per ML [discussion](https://lists.apache.org/thread.html/rb328513fb932e231cf8793f92dd1cc2269044cb73cb43a6662c464a1%40%3Cdev.couchdb.apache.org%3E) add a `uuid` field to db info results in order to be able to uniquely identify a particular instance of a database. When a database is deleted and re-created with the same name, it will return a new `uuid` value.
   
   ```
   $ http get $DB/db1
   HTTP/1.1 200 OK
   
   {
       "cluster": {
           "n": 0,
           "q": 0,
           "r": 0,
           "w": 0
       },
       "compact_running": false,
       "data_size": 0,
       "db_name": "db1",
       "disk_format_version": 0,
       "disk_size": 0,
       "doc_count": 0,
       "doc_del_count": 0,
       "instance_start_time": "0",
       "purge_seq": 0,
       "sizes": {
           "external": 2,
           "views": 0
       },
       "update_seq": "000000000000000000000000",
       "uuid": "b00a3d1632df7c15d12ca08299922c55"
   }
   
   $ http delete $DB/db1
   $ http put $DB/db1
   
   $ http get $DB/db1
   HTTP/1.1 200 OK
   
   {
       "cluster": {
           "n": 0,
           "q": 0,
           "r": 0,
           "w": 0
       },
       "compact_running": false,
       "data_size": 0,
       "db_name": "db1",
       "disk_format_version": 0,
       "disk_size": 0,
       "doc_count": 0,
       "doc_del_count": 0,
       "instance_start_time": "0",
       "purge_seq": 0,
       "sizes": {
           "external": 2,
           "views": 0
       },
       "update_seq": "000000000000000000000000",
       "uuid": "0e94a664c30595601c4c9bb1d8bb9f67"
   }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] nickva commented on pull request #2926: Include database uuid in db info result

Posted by GitBox <gi...@apache.org>.
nickva commented on pull request #2926:
URL: https://github.com/apache/couchdb/pull/2926#issuecomment-639019453


   > ```
   > $ curl -s -u adm:pass 'localhost:5984/db' -G | jq .uuid
   > "ae7c70071b4c89dabcb9fefce1bc9d77"
   > ```
   > 
   > Might be nice to add a test?
   
   @jaydoane I debated adding one but there is already a unit test included which checks that the uuid emitted is the same as the fabric2_db:uuid(Db), and not much else is happening above that level in chttpd so it probably wouldn't add that much more test coverage than what we have already.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] nickva merged pull request #2926: Include database uuid in db info result

Posted by GitBox <gi...@apache.org>.
nickva merged pull request #2926:
URL: https://github.com/apache/couchdb/pull/2926


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org