{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/1055","repository_url":"https://api.github.com/repos/facebook/rocksdb","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/1055/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/1055/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/1055/events","html_url":"https://github.com/facebook/rocksdb/issues/1055","id":145163933,"node_id":"MDU6SXNzdWUxNDUxNjM5MzM=","number":1055,"title":"Column Family creation and db open sequence","user":{"login":"warrenfalk","id":158330,"node_id":"MDQ6VXNlcjE1ODMzMA==","avatar_url":"https://avatars0.githubusercontent.com/u/158330?v=4","gravatar_id":"","url":"https://api.github.com/users/warrenfalk","html_url":"https://github.com/warrenfalk","followers_url":"https://api.github.com/users/warrenfalk/followers","following_url":"https://api.github.com/users/warrenfalk/following{/other_user}","gists_url":"https://api.github.com/users/warrenfalk/gists{/gist_id}","starred_url":"https://api.github.com/users/warrenfalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warrenfalk/subscriptions","organizations_url":"https://api.github.com/users/warrenfalk/orgs","repos_url":"https://api.github.com/users/warrenfalk/repos","events_url":"https://api.github.com/users/warrenfalk/events{/privacy}","received_events_url":"https://api.github.com/users/warrenfalk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-04-01T12:09:38Z","updated_at":"2018-09-30T08:32:36Z","closed_at":"2016-04-01T16:12:13Z","author_association":"CONTRIBUTOR","body":"This is part question, part issue, and part request for comment/advice.  I have developed a [.Net (C#) library for RocksDB](https://github.com/warrenfalk/rocksdb-sharp) and am now adding Column Family support to it.\n\nI'm confused by the design of the interface for column families. When I open the db, I must specify every column family it contains and none that it doesn't.  If I miss one the database won't open.  If I have an extra, the database won't open.  I therefore must know the state of the database before I open it (or open it read only, figure out the current state of column families, match that state temporarily in order to open the database again for write, then correct the state).\n\nFurthermore, this makes column families seem somewhat incompatible with the db option `create_if_missing = true`.  I may open a db whether it exists or not and it will be created as required unless I need column families.  Then I must know in advance whether the column families have been added to the database already, and so also whether or not the database exists.\n\nThe result is that it is hard to write code which is backward compatible with older versions of a database.\n\nAs part of the C# library, I was considering trying to ease this issue, but wonder if there's a good reason why the C++ interface doesn't already do this.\n\nThe way I want it to work is that if I specify `create_if_missing = true` on the db and I specify column family descriptors, then I expect it to create any column families I specified which don't already exist (backward compatibility), while it could still if I fail to specify a column that does exist.\n\nSo this is either a question or a feature request.  Can't it work that way?  Why doesn't it?  Is it advisable to write this behavior into the C# library?\n"},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/425704404","html_url":"https://github.com/facebook/rocksdb/issues/1055#issuecomment-425704404","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/1055","id":425704404,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTcwNDQwNA==","user":{"login":"TennyZhuang","id":9161438,"node_id":"MDQ6VXNlcjkxNjE0Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/9161438?v=4","gravatar_id":"","url":"https://api.github.com/users/TennyZhuang","html_url":"https://github.com/TennyZhuang","followers_url":"https://api.github.com/users/TennyZhuang/followers","following_url":"https://api.github.com/users/TennyZhuang/following{/other_user}","gists_url":"https://api.github.com/users/TennyZhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/TennyZhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TennyZhuang/subscriptions","organizations_url":"https://api.github.com/users/TennyZhuang/orgs","repos_url":"https://api.github.com/users/TennyZhuang/repos","events_url":"https://api.github.com/users/TennyZhuang/events{/privacy}","received_events_url":"https://api.github.com/users/TennyZhuang/received_events","type":"User","site_admin":false},"created_at":"2018-09-30T08:32:36Z","updated_at":"2018-09-30T08:32:36Z","author_association":"NONE","body":"@ajkr What I need is an interface like `Database.GetColumnFamily(opts, name)`, which will return a `ColumnFamilyHandle`, and we need not to reopen the database.\r\nIt can be implemented by enable `SetErrorIfExists(false)` for `Database.CreaateColumnFamily(opts, name)`.\r\n\r\nIt seems that there is no way to get a `ColumnFamilyHandle` for an existed but not opened column family, except reopening the database."}}
{"actor":{"display_login":"TennyZhuang"}}