You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Xu-Wentao (via GitHub)" <gi...@apache.org> on 2023/03/16 10:11:47 UTC

[GitHub] [shardingsphere-on-cloud] Xu-Wentao opened a new pull request, #268: WIP: feat(pitr): implement func backup

Xu-Wentao opened a new pull request, #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268

   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   <!-- Please delete options that are not relevant. -->
   
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   implememt func backup opengauss database
   ### Pre-submission checklist:
   
   <!--
   Please follow the requirements:
   1. Test is required for the feat/fix PR, unless you have a good reason
   2. Doc is required for the feat PR
   3. Use "request review" to notify the reviewer once you have resolved the review
   -->
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere-on-cloud] mlycore merged pull request #268: feat(pitr): implement func backup

Posted by "mlycore (via GitHub)" <gi...@apache.org>.
mlycore merged PR #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere-on-cloud] mlycore commented on a diff in pull request #268: feat(pitr): implement func backup

Posted by "mlycore (via GitHub)" <gi...@apache.org>.
mlycore commented on code in PR #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268#discussion_r1143119771


##########
pitr/cli/internal/cmd/backup.go:
##########
@@ -19,67 +19,345 @@ package cmd
 
 import (
 	"fmt"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg/model"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg/xerr"
+	"github.com/google/uuid"
+	"os"
+	"sync"
+	"time"
 
 	"github.com/spf13/cobra"
 
 	"github.com/apache/shardingsphere-on-cloud/pitr/cli/pkg/logging"
 )
 
 const (
-	dnBackupPath = "dn-backup-path"
-	dnThreadsNum = "dn-threads-num"
+	dnBackupPath                = "dn-backup-path"
+	dnThreadsNum                = "dn-threads-num"
+	defaultInstance             = "ins-default-ss"
+	defaultShowDetailRetryTimes = 3 // retry times of check backup detail from agent server

Review Comment:
   Please move the comments on top of the code.



##########
pitr/agent/internal/cons/backup.go:
##########
@@ -0,0 +1,34 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package cons
+
+const (
+	DBBackModeFull   = "FULL"
+	DBBackModePTrack = "PTRACK"
+
+	// opengauss backup status
+	OGBackupStatusOk      = "OK"
+	OGBackupStatusError   = "ERROR"
+	OGBackupStatusRunning = "RUNNING"
+
+	// agent backup status
+	DBBackupStatusCompleted = "Completed"
+	DBBackupStatusFailed    = "Failed"
+	DBBackupStatusRunning   = "Running"
+	DBBackupStatusOther     = "Other"

Review Comment:
   What do you expect users to do when he meet this `Other` status ?



##########
pitr/agent/internal/cons/backup.go:
##########
@@ -0,0 +1,34 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package cons
+
+const (
+	DBBackModeFull   = "FULL"
+	DBBackModePTrack = "PTRACK"
+
+	// opengauss backup status
+	OGBackupStatusOk      = "OK"
+	OGBackupStatusError   = "ERROR"
+	OGBackupStatusRunning = "RUNNING"
+
+	// agent backup status
+	DBBackupStatusCompleted = "Completed"
+	DBBackupStatusFailed    = "Failed"
+	DBBackupStatusRunning   = "Running"
+	DBBackupStatusOther     = "Other"

Review Comment:
   What is the possible status that `Other` implies ? 



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere-on-cloud] Xu-Wentao commented on a diff in pull request #268: feat(pitr): implement func backup

Posted by "Xu-Wentao (via GitHub)" <gi...@apache.org>.
Xu-Wentao commented on code in PR #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268#discussion_r1143162031


##########
pitr/cli/internal/cmd/backup.go:
##########
@@ -19,67 +19,345 @@ package cmd
 
 import (
 	"fmt"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg/model"
+	"github.com/apache/shardingsphere-on-cloud/pitr/cli/internal/pkg/xerr"
+	"github.com/google/uuid"
+	"os"
+	"sync"
+	"time"
 
 	"github.com/spf13/cobra"
 
 	"github.com/apache/shardingsphere-on-cloud/pitr/cli/pkg/logging"
 )
 
 const (
-	dnBackupPath = "dn-backup-path"
-	dnThreadsNum = "dn-threads-num"
+	dnBackupPath                = "dn-backup-path"
+	dnThreadsNum                = "dn-threads-num"
+	defaultInstance             = "ins-default-ss"
+	defaultShowDetailRetryTimes = 3 // retry times of check backup detail from agent server

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere-on-cloud] Xu-Wentao commented on pull request #268: feat(pitr): implement func backup

Posted by "Xu-Wentao (via GitHub)" <gi...@apache.org>.
Xu-Wentao commented on PR #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268#issuecomment-1477495632

   @lltgo 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere-on-cloud] Xu-Wentao commented on a diff in pull request #268: feat(pitr): implement func backup

Posted by "Xu-Wentao (via GitHub)" <gi...@apache.org>.
Xu-Wentao commented on code in PR #268:
URL: https://github.com/apache/shardingsphere-on-cloud/pull/268#discussion_r1143161756


##########
pitr/agent/internal/cons/backup.go:
##########
@@ -0,0 +1,34 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package cons
+
+const (
+	DBBackModeFull   = "FULL"
+	DBBackModePTrack = "PTRACK"
+
+	// opengauss backup status
+	OGBackupStatusOk      = "OK"
+	OGBackupStatusError   = "ERROR"
+	OGBackupStatusRunning = "RUNNING"
+
+	// agent backup status
+	DBBackupStatusCompleted = "Completed"
+	DBBackupStatusFailed    = "Failed"
+	DBBackupStatusRunning   = "Running"
+	DBBackupStatusOther     = "Other"

Review Comment:
   added more comment about `Other` status, this state is used for some intermediate status that we don't need to handle with.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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