Skip to content

Commit 5e0abcf

Browse files
committed
docs(stovepipe): remove redundant queue storage comments
1 parent dfeca3e commit 5e0abcf

8 files changed

Lines changed: 2 additions & 16 deletions

File tree

‎stovepipe/entity/queue.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ type Queue struct {
6161
Version int32 `json:"version"`
6262
}
6363

64-
// EnablementState returns the applied occurrence independently of operational row version.
6564
func (q Queue) EnablementState() QueueState {
6665
return QueueState{Queue: q.Name, State: q.Enablement, Version: q.EnablementVersion,
6766
EffectiveFromCommitURI: q.EffectiveFromCommitURI, ChangedAtMs: q.EnablementChangedAtMs}

‎stovepipe/entity/queue_log.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ func QueueLogID(version int64) string {
3737
return fmt.Sprintf("state/%d", version)
3838
}
3939

40-
// Snapshot returns the applied state represented by the occurrence.
4140
func (l QueueLog) Snapshot() QueueState {
4241
return QueueState{Queue: l.Queue, State: l.State, Version: l.QueueStateVersion,
4342
EffectiveFromCommitURI: l.EffectiveFromCommitURI, ChangedAtMs: l.TimestampMs}
4443
}
4544

46-
// Validate verifies a retained occurrence's identity and snapshot invariants.
4745
func (l QueueLog) Validate() error {
4846
if l.ID != QueueLogID(l.QueueStateVersion) {
4947
return fmt.Errorf("queue state log identity differs from its state version")

‎stovepipe/entity/queue_state.go‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ type QueueEnablement string
2222
const (
2323
// QueueEnablementUnknown is unset and never an explicit disablement.
2424
QueueEnablementUnknown QueueEnablement = ""
25-
// QueueEnablementEnabled identifies enabled queue coverage.
2625
QueueEnablementEnabled QueueEnablement = "enabled"
27-
// QueueEnablementDisabled identifies disabled queue coverage.
2826
QueueEnablementDisabled QueueEnablement = "disabled"
2927
)
3028

31-
// QueueState is one applied enablement occurrence, independent of storage row versions.
29+
// QueueState describes applied enablement, independent of storage row versions.
3230
type QueueState struct {
3331
// Queue is the stable repo-and-ref namespace, at most 255 bytes.
3432
Queue string
@@ -38,11 +36,10 @@ type QueueState struct {
3836
EffectiveFromCommitURI string
3937
// ChangedAtMs is the application timestamp in Unix milliseconds.
4038
ChangedAtMs int64
41-
// Version is the positive queue-scoped state version.
39+
// Version is the positive queue-scoped enablement sequence.
4240
Version int64
4341
}
4442

45-
// Validate verifies the invariants of a persisted state snapshot.
4643
func (s QueueState) Validate() error {
4744
if s.Queue == "" || len(s.Queue) > 255 || s.Version <= 0 || s.ChangedAtMs <= 0 {
4845
return fmt.Errorf("invalid queue state identity, version or timestamp")

‎stovepipe/entity/queue_summary.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ type QueueSummary struct {
3232
Version int64
3333
}
3434

35-
// Snapshot returns the enablement occurrence represented by this summary.
3635
func (s QueueSummary) Snapshot() QueueState {
3736
return QueueState{Queue: s.Queue, State: s.State, Version: s.QueueStateVersion,
3837
EffectiveFromCommitURI: s.EffectiveFromCommitURI, ChangedAtMs: s.StateTimestampMs}
3938
}
4039

41-
// Validate verifies projection identity, version and represented state.
4240
func (s QueueSummary) Validate() error {
4341
if s.Version <= 0 {
4442
return fmt.Errorf("invalid queue summary version")

‎stovepipe/extension/storage/mysql/queue_log_store.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type queueLogStore struct {
3232
queue string
3333
}
3434

35-
// NewQueueLogStore binds immutable MySQL occurrences to one queue.
3635
func NewQueueLogStore(db *sql.DB, scope tally.Scope, queue string) storage.QueueLogStore {
3736
return &queueLogStore{db: db, scope: scope, queue: queue}
3837
}

‎stovepipe/extension/storage/mysql/queue_summary_store.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type queueSummaryStore struct {
3232
queue string
3333
}
3434

35-
// NewQueueSummaryStore binds a MySQL queue summary store to one queue.
3635
func NewQueueSummaryStore(db *sql.DB, scope tally.Scope, queue string) storage.QueueSummaryStore {
3736
return &queueSummaryStore{db: db, scope: scope, queue: queue}
3837
}

‎stovepipe/extension/storage/mysql/storage.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ func (f *mysqlStorage) GetValidationFactStore() storage.ValidationFactStore {
121121
return f.validationFactStore
122122
}
123123

124-
// GetQueueSummaryStore returns the bound queue-summary store.
125124
func (f *mysqlStorage) GetQueueSummaryStore() storage.QueueSummaryStore { return f.queueSummaryStore }
126125

127-
// GetQueueLogStore returns the bound immutable-history store.
128126
func (f *mysqlStorage) GetQueueLogStore() storage.QueueLogStore {
129127
return f.queueLogStore
130128
}

‎stovepipe/extension/storage/storage.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ type Storage interface {
8787
// GetQueueStore returns the QueueStore instance.
8888
GetQueueStore() QueueStore
8989

90-
// GetQueueSummaryStore returns the derived queue status summary.
9190
GetQueueSummaryStore() QueueSummaryStore
9291

93-
// GetQueueLogStore returns immutable enablement history.
9492
GetQueueLogStore() QueueLogStore
9593

9694
// GetBuildStore returns the BuildStore instance.

0 commit comments

Comments
 (0)