Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
haoxins committed Apr 8, 2024
1 parent 414fde3 commit 9399140
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions schema_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ func (mgr *SchemaManager) ApplyTag(tag LabelSchema) (*ResultSet, error) {

if ttlCol != tag.TTLCol || ttlDuration != tag.TTLDuration {
if mgr.verbose {
log.Printf("ApplyTag: Alter the tag TTL. name=%s, col=%s, duration=%d\n", tag.Name, ttlCol, ttlDuration)
log.Printf(
"ApplyTag: Alter the tag TTL. name=%s, col from %s to %s, duration from %d to %d\n",
tag.Name,
ttlCol,
tag.TTLCol,
ttlDuration,
tag.TTLDuration,
)
}

_, err = mgr.pool.AddTagTTL(tag.Name, ttlCol, ttlDuration)
Expand Down Expand Up @@ -236,10 +243,17 @@ func (mgr *SchemaManager) ApplyEdge(edge LabelSchema) (*ResultSet, error) {

if ttlCol != edge.TTLCol || ttlDuration != edge.TTLDuration {
if mgr.verbose {
log.Printf("ApplyEdge: Alter the edge TTL. name=%s, col=%s, duration=%d\n", edge.Name, ttlCol, ttlDuration)
log.Printf(
"ApplyEdge: Alter the edge TTL. name=%s, col from %s to %s, duration from %d to %d\n",
edge.Name,
ttlCol,
edge.TTLCol,
ttlDuration,
edge.TTLDuration,
)
}

_, err = mgr.pool.AddEdgeTTL(edge.Name, ttlCol, ttlDuration)
_, err = mgr.pool.AddEdgeTTL(edge.Name, edge.TTLCol, edge.TTLDuration)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9399140

Please sign in to comment.