Skip to content

Commit

Permalink
refactor: rename detection id
Browse files Browse the repository at this point in the history
Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 committed Mar 28, 2024
1 parent 75a670e commit 9e8a9d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions go/vt/vtorc/db/generate_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ CREATE TABLE topology_recovery (
shard varchar(128) NOT NULL,
is_successful TINYint NOT NULL DEFAULT 0,
all_errors text not null default '',
last_detection_id bigint not null default 0,
detection_id bigint not null default 0,
PRIMARY KEY (recovery_id)
)`,
`
Expand Down Expand Up @@ -376,7 +376,7 @@ CREATE INDEX end_recovery_idx_topology_recovery on topology_recovery (end_recove
CREATE INDEX instance_timestamp_idx_database_instance_analysis_changelog on database_instance_analysis_changelog (alias, analysis_timestamp)
`,
`
CREATE INDEX last_detection_idx_topology_recovery on topology_recovery (last_detection_id)
CREATE INDEX detection_idx_topology_recovery on topology_recovery (detection_id)
`,
`
CREATE INDEX last_seen_active_idx_node_health on node_health (last_seen_active)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtorc/logic/topology_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type TopologyRecovery struct {
AllErrors []string
RecoveryStartTimestamp string
RecoveryEndTimestamp string
LastDetectionID int64
DetectionID int64
RelatedRecoveryID int64
Type RecoveryType
}
Expand Down
6 changes: 3 additions & 3 deletions go/vt/vtorc/logic/topology_recovery_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func writeTopologyRecovery(topologyRecovery *TopologyRecovery) (*TopologyRecover
analysis,
keyspace,
shard,
last_detection_id
detection_id
) values (
?,
?,
Expand Down Expand Up @@ -171,7 +171,7 @@ func readRecoveries(whereCondition string, limit string, args []any) ([]*Topolog
keyspace,
shard,
all_errors,
last_detection_id
detection_id
from
topology_recovery
%s
Expand All @@ -198,7 +198,7 @@ func readRecoveries(whereCondition string, limit string, args []any) ([]*Topolog

topologyRecovery.AllErrors = strings.Split(m.GetString("all_errors"), "\n")

topologyRecovery.LastDetectionID = m.GetInt64("last_detection_id")
topologyRecovery.DetectionID = m.GetInt64("detection_id")

res = append(res, &topologyRecovery)
return nil
Expand Down

0 comments on commit 9e8a9d8

Please sign in to comment.