Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/storage/postgres/gc/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (gc *GC) getLastTransactionIDForTenant(ctx context.Context, tenantID string
}

// deleteRecordsForTenant generates and executes DELETE queries for relation_tuples and attributes tables for a specific tenant.
func (gc *GC) deleteRecordsForTenant(ctx context.Context, table string, tenantID string, lastTransactionID uint64) error {
func (gc *GC) deleteRecordsForTenant(ctx context.Context, table, tenantID string, lastTransactionID uint64) error {
queryBuilder := utils.GenerateGCQueryForTenant(table, tenantID, lastTransactionID)
query, args, err := queryBuilder.ToSql()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/postgres/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func GenerateGCQuery(table string, value uint64) squirrel.DeleteBuilder {
// GenerateGCQueryForTenant generates a Squirrel DELETE query builder for tenant-aware garbage collection.
// It constructs a query to delete expired records from the specified table for a specific tenant
// based on the provided value, which represents a transaction ID.
func GenerateGCQueryForTenant(table string, tenantID string, value uint64) squirrel.DeleteBuilder {
func GenerateGCQueryForTenant(table, tenantID string, value uint64) squirrel.DeleteBuilder {
// Convert the provided value into a string format suitable for our SQL query, formatted as a transaction ID.
valStr := fmt.Sprintf("'%v'::xid8", value)

Expand Down