feat: record storenode unavailable
This commit is contained in:
parent
159221624b
commit
3f49bcb6e9
|
@ -1,4 +1,4 @@
|
|||
storage.db
|
||||
storage.db-shm
|
||||
storage.db-wal
|
||||
./storeverif
|
||||
./storemsgcounter
|
|
@ -15,7 +15,7 @@ LABEL maintainer="richard@status.im"
|
|||
LABEL source="https://github.com/waku-org/storenode-messages"
|
||||
LABEL description="Storenode message count verifier"
|
||||
|
||||
COPY --from=builder /go/src/github.com/waku-org/storenode-messages/build/storeverif /usr/local/bin/storeverif
|
||||
COPY --from=builder /go/src/github.com/waku-org/storenode-messages/build/storemsgcounter /usr/local/bin/storemsgcounter
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/storeverif"]
|
||||
ENTRYPOINT ["/usr/local/bin/storemsgcounter"]
|
||||
CMD ["-help"]
|
2
Makefile
2
Makefile
|
@ -4,7 +4,7 @@
|
|||
all: build
|
||||
|
||||
build:
|
||||
go build -tags=gowaku_no_rln -o build/storeverif ./cmd/storeverif
|
||||
go build -tags=gowaku_no_rln -o build/storemsgcounter ./cmd/storemsgcounter
|
||||
go build -tags=gowaku_no_rln -o build/populatedb ./cmd/populatedb
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ You need to setup a postgres db as such:
|
|||
|
||||
Then you can run the program with
|
||||
```
|
||||
./build/storeverif --storenode=some_multiaddress --storenode=some_multiaddress --pubsub-topic=some_pubsubtopic --cluster-id=16 --db-url=postgres://user:password@127.0.0.1:5432/telemetry
|
||||
./build/storemsgcounter --storenode=some_multiaddress --storenode=some_multiaddress --pubsub-topic=some_pubsubtopic --cluster-id=16 --db-url=postgres://user:password@127.0.0.1:5432/telemetry
|
||||
```
|
||||
|
||||
A dockerfile is also available for ease of setup
|
||||
|
|
|
@ -50,7 +50,7 @@ func Execute(ctx context.Context, options Options) error {
|
|||
return err
|
||||
}
|
||||
|
||||
dbStore, err := persistence.NewDBStore(logger, persistence.WithDB(db), persistence.WithMigrations(migrationFn))
|
||||
dbStore, err := persistence.NewDBStore(logger, persistence.WithDB(db), persistence.WithMigrations(migrationFn), persistence.WithRetentionPolicy(options.RetentionPolicy))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ func verifyHistory(ctx context.Context, wakuNode *node.WakuNode, dbStore *persis
|
|||
wg.Add(1)
|
||||
go func(topic string, lastSyncTimestamp *time.Time) {
|
||||
defer wg.Done()
|
||||
retrieveHistory(ctx, topic, lastSyncTimestamp, wakuNode, dbStore, tx, logger)
|
||||
retrieveHistory(ctx, runId, topic, lastSyncTimestamp, wakuNode, dbStore, tx, logger)
|
||||
}(topic, lastSyncTimestamp)
|
||||
}
|
||||
wg.Wait()
|
||||
|
@ -158,7 +158,7 @@ func verifyHistory(ctx context.Context, wakuNode *node.WakuNode, dbStore *persis
|
|||
go func(node string, messageHashes []pb.MessageHash) {
|
||||
defer wg.Done()
|
||||
nodeMultiaddr, _ := multiaddr.NewMultiaddr(node)
|
||||
verifyMessageExistence(ctx, nodeMultiaddr, messageHashes, wakuNode, logger)
|
||||
verifyMessageExistence(ctx, runId, tx, nodeMultiaddr, messageHashes, wakuNode, dbStore, logger)
|
||||
}(node, messageHashes)
|
||||
}
|
||||
wg.Wait()
|
||||
|
@ -198,7 +198,7 @@ func verifyHistory(ctx context.Context, wakuNode *node.WakuNode, dbStore *persis
|
|||
return nil
|
||||
}
|
||||
|
||||
func retrieveHistory(ctx context.Context, topic string, lastSyncTimestamp *time.Time, wakuNode *node.WakuNode, dbStore *persistence.DBStore, tx *sql.Tx, logger *zap.Logger) {
|
||||
func retrieveHistory(ctx context.Context, runId string, topic string, lastSyncTimestamp *time.Time, wakuNode *node.WakuNode, dbStore *persistence.DBStore, tx *sql.Tx, logger *zap.Logger) {
|
||||
logger = logger.With(zap.String("topic", topic), zap.Timep("lastSyncTimestamp", lastSyncTimestamp))
|
||||
|
||||
now := wakuNode.Timesource().Now()
|
||||
|
@ -242,8 +242,12 @@ func retrieveHistory(ctx context.Context, topic string, lastSyncTimestamp *time.
|
|||
}
|
||||
|
||||
if storeNodeFailure {
|
||||
// TODO: Notify that storenode was not available from X to Y time
|
||||
logger.Error("storenode not available", zap.Stringer("storenode", node), zap.Time("startTime", startTime), zap.Time("endTime", endTime))
|
||||
err := dbStore.RecordStorenodeUnavailable(runId, node.String())
|
||||
if err != nil {
|
||||
logger.Error("could not store recordnode unavailable", zap.Error(err), zap.Stringer("storenode", node))
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
iteratorLbl:
|
||||
|
@ -299,7 +303,7 @@ func retrieveHistory(ctx context.Context, topic string, lastSyncTimestamp *time.
|
|||
}
|
||||
}
|
||||
|
||||
func verifyMessageExistence(ctx context.Context, nodeAddr multiaddr.Multiaddr, messageHashes []pb.MessageHash, wakuNode *node.WakuNode, logger *zap.Logger) {
|
||||
func verifyMessageExistence(ctx context.Context, runId string, tx *sql.Tx, nodeAddr multiaddr.Multiaddr, messageHashes []pb.MessageHash, wakuNode *node.WakuNode, dbStore *persistence.DBStore, logger *zap.Logger) {
|
||||
storeNodeFailure := false
|
||||
var result *store.Result
|
||||
var err error
|
||||
|
@ -318,10 +322,14 @@ queryLbl:
|
|||
}
|
||||
|
||||
if storeNodeFailure {
|
||||
// TODO: Notify that storenode was not available from X to Y time
|
||||
logger.Error("storenode not available",
|
||||
zap.Stringer("storenode", nodeAddr),
|
||||
zap.Stringers("hashes", messageHashes))
|
||||
|
||||
err := dbStore.RecordStorenodeUnavailable(runId, nodeAddr.String())
|
||||
if err != nil {
|
||||
logger.Error("could not store recordnode unavailable", zap.Error(err), zap.Stringer("storenode", nodeAddr))
|
||||
}
|
||||
} else {
|
||||
for !result.IsComplete() {
|
||||
nodeAddrStr := nodeAddr.String()
|
||||
|
@ -360,11 +368,15 @@ queryLbl:
|
|||
}
|
||||
|
||||
if storeNodeFailure {
|
||||
// TODO: Notify that storenode was not available from X to Y time
|
||||
logger.Error("storenode not available",
|
||||
zap.Stringer("storenode", nodeAddr),
|
||||
zap.Stringers("hashes", messageHashes),
|
||||
zap.String("cursor", hexutil.Encode(result.Cursor())))
|
||||
|
||||
err := dbStore.RecordStorenodeUnavailable(runId, nodeAddr.String())
|
||||
if err != nil {
|
||||
logger.Error("could not store recordnode unavailable", zap.Error(err), zap.Stringer("storenode", nodeAddr))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -140,10 +140,17 @@ func (d *DBStore) cleanOlderRecords(ctx context.Context) error {
|
|||
d.log.Debug("cleaning older records...")
|
||||
|
||||
deleteFrom := time.Now().Add(d.retentionPolicy).UnixNano()
|
||||
|
||||
_, err := d.db.ExecContext(ctx, "DELETE FROM missingMessages WHERE storedAt < $1", deleteFrom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = d.db.ExecContext(ctx, "DELETE FROM storeNodeUnavailable WHERE requestTime < $1", deleteFrom)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
d.log.Debug("older records removed")
|
||||
|
||||
return nil
|
||||
|
@ -240,6 +247,7 @@ func (d *DBStore) RecordMessage(uuid string, tx *sql.Tx, msgHash pb.MessageHash,
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
for _, s := range storenodes {
|
||||
|
@ -249,5 +257,21 @@ func (d *DBStore) RecordMessage(uuid string, tx *sql.Tx, msgHash pb.MessageHash,
|
|||
}
|
||||
}
|
||||
|
||||
return stmt.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *DBStore) RecordStorenodeUnavailable(uuid string, storenode string) error {
|
||||
stmt, err := d.db.Prepare("INSERT INTO storeNodeUnavailable(runId, storenode, requestTime) VALUES ($1, $2, $3) ON CONFLICT DO NOTHING")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer stmt.Close()
|
||||
|
||||
now := time.Now().UnixNano()
|
||||
_, err = stmt.Exec(uuid, storenode, now)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by go-bindata. DO NOT EDIT.
|
||||
// sources:
|
||||
// 1_setup.down.sql (136B)
|
||||
// 1_setup.up.sql (618B)
|
||||
// 1_setup.down.sql (209B)
|
||||
// 1_setup.up.sql (856B)
|
||||
// doc.go (74B)
|
||||
|
||||
package migrations
|
||||
|
@ -71,7 +71,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
|||
return nil
|
||||
}
|
||||
|
||||
var __1_setupDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\xf0\xf4\x73\x71\x8d\x50\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\xc8\x4c\xa9\xf0\x2d\x4e\x37\xb4\xe6\xc2\x23\x6b\x04\x95\x0d\x71\x74\xf2\x71\x45\x92\x2d\xae\xcc\x4b\x0e\xc9\x2f\xc8\x4c\x0e\x2e\x49\x2c\x29\x2d\xc6\xa1\x2a\x37\xb3\xb8\x38\x33\x2f\xdd\x37\xb5\xb8\x38\x31\x3d\xb5\xd8\x9a\x0b\x10\x00\x00\xff\xff\x82\x27\xd8\xb4\x88\x00\x00\x00")
|
||||
var __1_setupDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\xf0\xf4\x73\x71\x8d\x50\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\xc8\x4c\xa9\xf0\x2d\x4e\x37\xb4\xe6\xc2\x23\x6b\x84\x5b\x36\xb8\xa4\x08\xa6\x37\xc4\xd1\xc9\xc7\x15\x49\xb6\xb8\x32\x2f\x39\x24\xbf\x20\x33\x39\xb8\x24\xb1\xa4\xb4\x18\x87\xaa\xdc\xcc\xe2\xe2\xcc\xbc\x74\xdf\xd4\xe2\xe2\xc4\xf4\x54\x5c\xaa\x8a\x4b\xf2\x8b\x52\xfd\xf2\x53\x52\x43\xf3\x12\xcb\x12\x33\x73\x12\x93\x72\x52\xad\xb9\x00\x01\x00\x00\xff\xff\x4f\xc7\x7a\xbd\xd1\x00\x00\x00")
|
||||
|
||||
func _1_setupDownSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
|
@ -86,12 +86,12 @@ func _1_setupDownSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1_setup.down.sql", size: 136, mode: os.FileMode(0664), modTime: time.Unix(1715888633, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc6, 0x9b, 0xf2, 0x5c, 0xc0, 0xf3, 0xc2, 0x75, 0x25, 0xdb, 0x82, 0x6c, 0xff, 0x1c, 0x18, 0x91, 0x6f, 0x1d, 0x18, 0x3b, 0xf3, 0x76, 0x6d, 0xcc, 0x6, 0x3a, 0x54, 0x65, 0xc4, 0x22, 0xf2, 0x99}}
|
||||
info := bindataFileInfo{name: "1_setup.down.sql", size: 209, mode: os.FileMode(0664), modTime: time.Unix(1716212112, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x29, 0xd4, 0xea, 0x7a, 0x83, 0x13, 0x9f, 0x16, 0x6f, 0x3f, 0x53, 0x4f, 0x1, 0xcc, 0xeb, 0x14, 0x7a, 0xf0, 0x62, 0x2d, 0x22, 0x96, 0x52, 0x9d, 0x57, 0x54, 0x8f, 0x51, 0xe8, 0x16, 0x8a, 0x33}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var __1_setupUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x90\xcd\x6e\xab\x30\x10\x85\xd7\xf1\x53\xcc\x12\x24\x36\xf7\x6e\x59\x91\x64\x9a\x5a\x05\xa7\x02\x57\x22\x4b\x82\x2d\x6a\x29\xfc\x88\xb1\xa5\xf6\xed\xab\x3a\x11\xa2\x10\xa5\x52\xd7\x33\xf3\x9d\x33\xdf\x2e\xc7\x44\x22\xc8\x64\x9b\x22\xf0\x27\x10\x47\x09\x58\xf2\x42\x16\x40\x9f\x5d\x2d\xfb\xc1\xd4\x85\xad\xac\x23\x08\xd8\xa6\xbe\x38\xb2\x7a\xe4\x0a\xb8\x90\x78\xc0\xdc\xef\x8b\xb7\x34\x8d\xd8\x66\x70\x67\x72\x67\x7f\x01\x12\x4b\x39\x9f\x5d\x2a\xb2\xc5\x37\xcf\xb4\x9a\x6c\xd5\x0e\xb0\xe5\x07\x2e\x7e\xec\xbc\xe6\x3c\x4b\xf2\x13\xbc\xe0\x09\x82\x29\x29\x82\x19\x37\x64\x61\xcc\x18\x7b\x50\xba\x35\x44\xa6\x6b\x32\x4d\x54\x35\xda\x97\x1e\x5d\xc7\xd5\xaa\xd1\x9f\x5f\x69\xaf\xe8\xe7\x8a\xde\xd7\x33\x6a\x1e\x7d\x48\xb6\x1f\x75\xd7\x2b\x7d\xef\xf0\x66\x79\x39\xf1\x37\x2a\xb1\x2b\x1c\x2c\x8c\xcd\x7a\x45\x30\x25\x5d\x8d\xdd\x84\x71\xb1\xc7\x72\x21\xcc\xa8\x8f\x8c\x9a\x7f\x70\x14\x4b\x77\xc1\x14\xbd\xc7\x62\x17\xc6\xbf\x53\xfe\xdf\xa3\x78\xfd\x61\xcc\xbe\x02\x00\x00\xff\xff\x8b\x58\x59\x30\x6a\x02\x00\x00")
|
||||
var __1_setupUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x91\x3d\x6f\xc2\x30\x10\x86\x67\xfc\x2b\x6e\x4c\x24\x96\x76\x65\x0a\xe0\x52\xab\x60\xaa\xd8\x48\x30\x1a\x6c\xa5\x96\xf2\x41\x73\x76\xd5\xfe\xfb\x0a\xb7\x8a\x42\x12\x88\xda\xf9\x7c\xcf\xfb\xfa\xb9\x45\x4a\x13\x49\x41\x26\xf3\x35\x05\xf6\x04\x7c\x2b\x81\xee\x99\x90\x02\xf0\xab\x3c\xc9\xea\x6c\x4f\xc2\x29\xe7\x11\x22\x32\x39\xe5\x1e\x9d\xa9\x99\x06\xc6\x25\x5d\xd1\x34\xbc\xe7\xbb\xf5\x7a\x4a\x26\x67\x7f\x44\x7f\x0c\x1b\x20\xe9\x5e\xb6\x67\xb9\x42\x27\x2e\x3c\x5b\x18\x74\xaa\x38\xc3\x9c\xad\x18\xbf\x7a\xf3\x9a\xb2\x4d\x92\x1e\xe0\x85\x1e\x20\x6a\x92\xa6\xd0\xe2\xc6\x24\x9e\x11\x72\xa7\x73\x61\x11\x6d\x99\x6d\x0c\xa2\xca\x4c\xe8\x5c\xfb\x92\xe9\x5e\xa1\x7f\xff\xa4\xf8\x41\x3f\x2b\x7c\xeb\xcf\x30\xbb\xf7\x41\x74\x55\x6d\xca\x4a\x9b\xa1\xc5\x5f\xc9\xdd\x49\xd8\xd1\x89\xeb\xe1\xa0\x23\xac\xd5\x6b\x0a\x4d\xd2\x95\x30\xc6\x97\x74\xdf\x11\x66\xf5\xe7\x06\xb3\x07\xd8\xf2\xae\xbb\xa8\x89\x5e\x52\xb1\x88\x67\xe3\x94\xc7\x21\x4a\xd0\x3f\x72\xb5\x90\xc4\x2b\x6d\x76\xa5\xfa\x50\x36\x57\xc7\xdc\xdc\x3e\xdd\x6d\x8d\xb5\x79\xf7\x06\xdd\xe5\x06\xa3\xbe\x02\xfb\x8f\xa6\x84\xab\x83\xa9\xa1\xbe\x51\x2b\x3c\x9e\x91\xef\x00\x00\x00\xff\xff\x8d\xc8\x7a\x90\x58\x03\x00\x00")
|
||||
|
||||
func _1_setupUpSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
|
@ -106,8 +106,8 @@ func _1_setupUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1_setup.up.sql", size: 618, mode: os.FileMode(0664), modTime: time.Unix(1715888758, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0xe5, 0x52, 0x2, 0x8e, 0x32, 0xdd, 0x51, 0xad, 0x2b, 0x26, 0x9a, 0x85, 0x37, 0x2c, 0x6d, 0x8, 0x7e, 0x7f, 0xae, 0xa9, 0x69, 0xb7, 0x83, 0x3e, 0x40, 0x47, 0x1e, 0xc8, 0x2e, 0x48, 0x67}}
|
||||
info := bindataFileInfo{name: "1_setup.up.sql", size: 856, mode: os.FileMode(0664), modTime: time.Unix(1716213117, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe, 0x35, 0xf8, 0x8e, 0x74, 0xf4, 0xdc, 0x81, 0xc1, 0x30, 0x44, 0x54, 0x70, 0x36, 0xdb, 0x7c, 0x41, 0x8b, 0xba, 0xd0, 0x52, 0x26, 0x59, 0xbf, 0x56, 0xa, 0x84, 0x8d, 0x89, 0xfe, 0xf1, 0x69}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
DROP INDEX IF EXISTS idxMsg1;
|
||||
DROP INDEX IF EXISTS idxMsg2;
|
||||
DROP INDEX IF EXISTS idxStr1;
|
||||
DROP TABLE IF EXISTS syncTopicStatus;
|
||||
DROP TABLE IF EXISTS missingMessages;
|
||||
DROP TABLE IF EXISTS storeNodeUnavailable;
|
||||
|
|
|
@ -5,7 +5,6 @@ CREATE TABLE IF NOT EXISTS syncTopicStatus (
|
|||
PRIMARY KEY (clusterId, pubsubTopic)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS missingMessages (
|
||||
runId TEXT NOT NULL,
|
||||
clusterId INTEGER NOT NULL,
|
||||
|
@ -20,3 +19,12 @@ CREATE TABLE IF NOT EXISTS missingMessages (
|
|||
|
||||
CREATE INDEX IF NOT EXISTS idxMsg1 ON missingMessages(storedAt DESC);
|
||||
CREATE INDEX IF NOT EXISTS idxMsg2 ON missingMessages(runId);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS storeNodeUnavailable (
|
||||
runId TEXT NOT NULL,
|
||||
storenode TEXT NOT NULL,
|
||||
requestTime BIGINT NOT NULL,
|
||||
PRIMARY KEY (runId, storenode)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idxStr1 ON storeNodeUnavailable(requestTime);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by go-bindata. DO NOT EDIT.
|
||||
// sources:
|
||||
// 1_setup.down.sql (136B)
|
||||
// 1_setup.up.sql (667B)
|
||||
// 1_setup.down.sql (209B)
|
||||
// 1_setup.up.sql (927B)
|
||||
// doc.go (74B)
|
||||
|
||||
package migrations
|
||||
|
@ -71,7 +71,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
|||
return nil
|
||||
}
|
||||
|
||||
var __1_setupDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\xf0\xf4\x73\x71\x8d\x50\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\xc8\x4c\xa9\xf0\x2d\x4e\x37\xb4\xe6\xc2\x23\x6b\x04\x95\x0d\x71\x74\xf2\x71\x45\x92\x2d\xae\xcc\x4b\x0e\xc9\x2f\xc8\x4c\x0e\x2e\x49\x2c\x29\x2d\xc6\xa1\x2a\x37\xb3\xb8\x38\x33\x2f\xdd\x37\xb5\xb8\x38\x31\x3d\xb5\xd8\x9a\x0b\x10\x00\x00\xff\xff\x82\x27\xd8\xb4\x88\x00\x00\x00")
|
||||
var __1_setupDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\xf0\xf4\x73\x71\x8d\x50\xf0\x74\x53\x70\x8d\xf0\x0c\x0e\x09\x56\xc8\x4c\xa9\xf0\x2d\x4e\x37\xb4\xe6\xc2\x23\x6b\x84\x5b\x36\xb8\xa4\x08\xa6\x37\xc4\xd1\xc9\xc7\x15\x49\xb6\xb8\x32\x2f\x39\x24\xbf\x20\x33\x39\xb8\x24\xb1\xa4\xb4\x18\x87\xaa\xdc\xcc\xe2\xe2\xcc\xbc\x74\xdf\xd4\xe2\xe2\xc4\xf4\x54\x5c\xaa\x8a\x4b\xf2\x8b\x52\xfd\xf2\x53\x52\x43\xf3\x12\xcb\x12\x33\x73\x12\x93\x72\x52\xad\xb9\x00\x01\x00\x00\xff\xff\x4f\xc7\x7a\xbd\xd1\x00\x00\x00")
|
||||
|
||||
func _1_setupDownSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
|
@ -86,12 +86,12 @@ func _1_setupDownSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1_setup.down.sql", size: 136, mode: os.FileMode(0664), modTime: time.Unix(1715284437, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc6, 0x9b, 0xf2, 0x5c, 0xc0, 0xf3, 0xc2, 0x75, 0x25, 0xdb, 0x82, 0x6c, 0xff, 0x1c, 0x18, 0x91, 0x6f, 0x1d, 0x18, 0x3b, 0xf3, 0x76, 0x6d, 0xcc, 0x6, 0x3a, 0x54, 0x65, 0xc4, 0x22, 0xf2, 0x99}}
|
||||
info := bindataFileInfo{name: "1_setup.down.sql", size: 209, mode: os.FileMode(0664), modTime: time.Unix(1716212168, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x29, 0xd4, 0xea, 0x7a, 0x83, 0x13, 0x9f, 0x16, 0x6f, 0x3f, 0x53, 0x4f, 0x1, 0xcc, 0xeb, 0x14, 0x7a, 0xf0, 0x62, 0x2d, 0x22, 0x96, 0x52, 0x9d, 0x57, 0x54, 0x8f, 0x51, 0xe8, 0x16, 0x8a, 0x33}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var __1_setupUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\xbb\x4e\xc3\x30\x14\x86\xe7\xfa\x29\xce\x98\x48\x59\x60\xcd\x64\x12\x43\x2c\x72\x41\x8e\x4b\xdb\x31\x4d\xac\x10\xa9\xb9\x28\xc7\x96\xe0\xed\x11\xa6\x8a\x4a\x30\x65\xe8\x7c\xfc\x7f\xff\xc5\x91\x60\x54\x32\x90\xf4\x21\x65\xc0\x1f\x21\x2f\x24\xb0\x3d\x2f\x65\x09\xf8\x31\xd4\x72\x9c\xba\xba\xd4\x95\x36\x08\x1e\xd9\xd4\x27\x83\x5a\xcd\xbc\x01\x9e\x4b\xf6\xc4\x84\x7d\x9f\x6f\xd3\x34\x20\x9b\xc9\x1c\xd1\x1c\xad\x02\x5e\xa9\x88\x12\xfa\xe3\x7c\xaa\x50\x97\x5f\xc8\xae\x57\xa8\xab\x7e\x72\x31\x5e\x04\xcf\xa8\x38\xc0\x33\x3b\x80\xb7\xb8\x05\x70\xc1\xf6\x89\x0f\x3b\x2e\x93\x62\x2b\x41\x14\x3b\x1e\x87\x84\x90\x2b\x35\xfa\x0e\xb1\x1b\xda\x4c\x21\x56\xad\xb2\x35\x66\x33\xf0\xc6\x95\xf1\x96\x7e\xfd\xb7\x41\x52\xe1\x9b\xf3\x8c\xed\xd5\xe6\xa8\xc7\x59\x0d\x63\xa3\xfe\x10\x9f\x3f\xc1\x71\xb4\xca\x86\xea\xdf\x54\x58\x0d\x7a\x11\x31\x80\xc5\xd0\x35\xe8\x79\x4f\x9e\xc7\x6c\xbf\xda\xb3\x6b\xde\x33\x6c\xef\xa0\xc8\xd7\xd3\x7a\x4b\x92\x98\x95\x91\x1f\xfe\x4f\xb9\x77\x51\xec\xef\xf8\x21\xf9\x0c\x00\x00\xff\xff\xdf\xde\xf1\xa8\x9b\x02\x00\x00")
|
||||
var __1_setupUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x91\x4d\x4f\xc2\x30\x18\xc7\xcf\xf4\x53\x3c\xc7\x2d\xe1\xa2\xd7\x9d\x26\x54\x69\x84\xcd\xb4\x45\xe0\x58\x68\x33\x9b\xec\x05\xf7\xb4\x46\xbf\xbd\xa1\x12\x82\x58\xc7\x81\x73\xfb\xfc\x5f\x7e\xff\x09\xa7\xb9\xa4\x20\xf3\x87\x39\x05\xf6\x08\x45\x29\x81\xae\x99\x90\x02\xf0\xab\xdd\xc9\x6e\x6f\x77\xc2\x29\xe7\x11\x12\x32\xda\xd5\x1e\x9d\xe9\x99\x06\x56\x48\xfa\x44\x79\xf8\x5f\x2c\xe7\xf3\x31\x19\xed\xfd\x16\xfd\x36\x5c\xc0\x6b\xce\x27\xb3\xfc\xd7\x73\xad\xd0\x89\x83\xa4\x6d\x0c\x3a\xd5\xec\x63\x1a\x2f\x9c\x2d\x72\xbe\x81\x67\xba\x81\xe4\xe4\x36\x86\x33\xed\x94\xa4\xb0\x62\x72\x56\x2e\x25\xf0\x72\xc5\xa6\x19\x21\x64\xa0\x46\x63\x11\x6d\x5b\x2d\x0c\xa2\xaa\x4c\xa8\xd1\xfb\x96\xe9\x58\xc6\x5b\xfa\x35\x3f\x06\x33\x85\x6f\xd1\x67\xac\x06\x9b\xa3\xeb\x7a\xd3\x76\xda\xfc\x73\x7c\x1c\x21\xf2\x18\x2e\x75\xee\xfe\xaa\xc2\x05\xd0\xb3\x88\x63\x38\x19\xc6\x80\x1e\x79\xb2\x62\x4a\xd7\x17\x3c\xad\xfe\x5c\x60\x75\x07\x65\x71\x89\x36\x39\x25\x99\x52\x31\x49\xb3\xeb\x2a\xf7\x31\x95\xb0\x4e\x9a\x0d\x8e\x1a\x9c\x8a\x4e\x9b\x65\xab\x3e\x94\xad\xd5\xb6\x36\x83\xcb\x0e\xe2\xed\xcd\xbb\x37\xe8\x0e\xfb\x5c\x87\x18\x2c\x6e\xc2\x27\x5c\x1f\xf0\xc5\x4a\x24\x67\x59\xd2\x8c\x7c\x07\x00\x00\xff\xff\x6e\xd3\x44\xe6\x9f\x03\x00\x00")
|
||||
|
||||
func _1_setupUpSqlBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
|
@ -106,8 +106,8 @@ func _1_setupUpSql() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "1_setup.up.sql", size: 667, mode: os.FileMode(0664), modTime: time.Unix(1715284427, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2a, 0xac, 0x26, 0x5, 0xe0, 0x2b, 0x1, 0xc5, 0x59, 0x76, 0x2b, 0xae, 0x87, 0x57, 0x29, 0x1e, 0xf3, 0x6a, 0xa0, 0x6c, 0xe8, 0x4e, 0xea, 0xbf, 0xe3, 0xf9, 0x9f, 0xd8, 0x2d, 0xe7, 0xaa, 0x5}}
|
||||
info := bindataFileInfo{name: "1_setup.up.sql", size: 927, mode: os.FileMode(0664), modTime: time.Unix(1716212183, 0)}
|
||||
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcc, 0x43, 0xbc, 0x2c, 0x21, 0xab, 0xc4, 0xe7, 0xc5, 0x35, 0xea, 0xbb, 0x4b, 0x1c, 0x98, 0x4, 0x62, 0x56, 0x6d, 0xaf, 0x18, 0x28, 0xe5, 0xf8, 0x8, 0xfd, 0xa1, 0x3, 0xa8, 0xe0, 0x65, 0xe1}}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
DROP INDEX IF EXISTS idxMsg1;
|
||||
DROP INDEX IF EXISTS idxMsg2;
|
||||
DROP INDEX IF EXISTS idxStr1;
|
||||
DROP TABLE IF EXISTS syncTopicStatus;
|
||||
DROP TABLE IF EXISTS missingMessages;
|
||||
DROP TABLE IF EXISTS storeNodeUnavailable;
|
||||
|
|
|
@ -20,3 +20,12 @@ CREATE TABLE IF NOT EXISTS missingMessages (
|
|||
|
||||
CREATE INDEX IF NOT EXISTS idxMsg1 ON missingMessages(storedAt DESC);
|
||||
CREATE INDEX IF NOT EXISTS idxMsg2 ON missingMessages(runId);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS storeNodeUnavailable (
|
||||
runId VARCHAR NOT NULL,
|
||||
storenode VARCHAR NOT NULL,
|
||||
requestTime INTEGER NOT NULL,
|
||||
PRIMARY KEY (runId, storenode)
|
||||
) WITHOUT ROWID;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idxStr1 ON storeNodeUnavailable(requestTime);
|
||||
|
|
Loading…
Reference in New Issue