zhangyifan27 opened a new pull request #593: URL: https://github.com/apache/incubator-pegasus/pull/593
#What problem does this PR solve? <!--add issue link with summary if exists--> When we reopen an existing db, we will use latest option file to construct options. However, if this file is an old version file which has uncompatible options with official rocksdb, we would get an error and fail to open db. https://github.com/apache/incubator-pegasus/blob/ae7caa2599357f83cbbf79c4367a5d0a72f04288/src/server/pegasus_server_impl.cpp#L1341-L1349 ### What is changed and how it works? If the option file has known uncompatible options `pegasus_data_version` and `pegasus_data`, we skip loading options from file and use default options to open db. A new version option file will be generated when we succeed to open db, after that we could use existing option file to construct options. That means the first time we open an old version db, we must use default options, and that may lead to unexpected flushes and compactions. ### Check List <!--REMOVE the items that are not applicable--> Tests <!-- At least one of them must be included. --> - Manual test (add detailed scripts or steps below) 1. deploy an old version cluster. 2. create some old version replicas. 3. upgrade replica servers to the new version with #587 and this patch. 4. test if new version servers could start apps sccessfully. Code changes - Has exported function/method change Side effects - Increased code complexity Related changes #587 - Need to cherry-pick to the release branch ---------------------------------------------------------------- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
