Skip to content

Commit bd20d43

Browse files
authored
Improve error message for clone to point in time without existing PITR config (#300)
1 parent 318b5da commit bd20d43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/cluster/pitr-config/pitr_config_ops.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ var clonePitrConfigCmd = &cobra.Command{
423423
// No PITR config exists, so we create one and clone to current time.
424424
// "clone-at-millis" argument should not be provided in this case.
425425
if cmd.Flags().Lookup("clone-at-millis").Changed {
426-
logrus.Fatalf("A PITR Config doesn't exist for %s namespace %s in cluster %s. So clone-at-millis parameter must not be specified\n", namespaceType, namespaceName, ClusterName)
426+
logrus.Fatalf("No PITR configuration found for %s namespace %s in cluster %s. The 'clone-at-millis' parameter cannot be used unless a valid PITR configuration is set up.\n", namespaceType, namespaceName, ClusterName)
427427
}
428428
cloneSpec.SetCloneNow(*ybmclient.NewDatabaseCloneNowSpec(namespaceId, cloneAs))
429429
} else {

cmd/pitr_config_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ test_ycql_db YCQL 6 ACTIVE 123456
776776
Expect(err).NotTo(HaveOccurred())
777777
Expect(ysqlErr).NotTo(HaveOccurred())
778778
ysqlSession.Wait(2)
779-
Expect(ysqlSession.Err).Should(gbytes.Say("A PITR Config doesn't exist for YSQL namespace yugabyte in cluster stunning-sole. So clone-at-millis parameter must not be specified"))
779+
Expect(ysqlSession.Err).Should(gbytes.Say("No PITR configuration found for YSQL namespace yugabyte in cluster stunning-sole. The 'clone-at-millis' parameter cannot be used unless a valid PITR configuration is set up"))
780780
ysqlSession.Kill()
781781
})
782782

0 commit comments

Comments
 (0)