로그 제거
This commit is contained in:
@ -4,8 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"repositories.action2quare.com/ayo/gocommon/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type cache_stage[T any] struct {
|
type cache_stage[T any] struct {
|
||||||
@ -33,8 +31,6 @@ func (c *consumer_common[T]) add_internal(sk storagekey, si T) {
|
|||||||
delete(c.stages[0].deleted, sk)
|
delete(c.stages[0].deleted, sk)
|
||||||
c.stages[1].cache[sk] = si
|
c.stages[1].cache[sk] = si
|
||||||
delete(c.stages[1].deleted, sk)
|
delete(c.stages[1].deleted, sk)
|
||||||
|
|
||||||
logger.Printf("add : %v, %v\n", *c.stages[0], *c.stages[1])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *consumer_common[T]) add(sk storagekey, si T) {
|
func (c *consumer_common[T]) add(sk storagekey, si T) {
|
||||||
@ -49,8 +45,6 @@ func (c *consumer_common[T]) delete_internal(sk storagekey) {
|
|||||||
c.stages[0].deleted[sk] = true
|
c.stages[0].deleted[sk] = true
|
||||||
delete(c.stages[1].cache, sk)
|
delete(c.stages[1].cache, sk)
|
||||||
c.stages[1].deleted[sk] = true
|
c.stages[1].deleted[sk] = true
|
||||||
|
|
||||||
logger.Printf("delete : %v, %v\n", *c.stages[0], *c.stages[1])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *consumer_common[T]) delete(sk storagekey) {
|
func (c *consumer_common[T]) delete(sk storagekey) {
|
||||||
@ -64,10 +58,6 @@ func (c *consumer_common[T]) changeStage() {
|
|||||||
c.lock.Lock()
|
c.lock.Lock()
|
||||||
defer c.lock.Unlock()
|
defer c.lock.Unlock()
|
||||||
|
|
||||||
logger.Printf("changeStage : %v, %v\n", *c.stages[0], *c.stages[1])
|
|
||||||
|
|
||||||
c.stages[1] = c.stages[0]
|
c.stages[1] = c.stages[0]
|
||||||
c.stages[0] = make_cache_stage[T]()
|
c.stages[0] = make_cache_stage[T]()
|
||||||
|
|
||||||
logger.Printf("---> : %v, %v\n", *c.stages[0], *c.stages[1])
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user