-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from 0xPolygon/sync-tasks-table
Storage optimized sync tracking
- Loading branch information
Showing
7 changed files
with
47 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- +migrate Down | ||
DROP TABLE IF EXISTS data_node.sync_tasks CASCADE; | ||
|
||
-- +migrate Up | ||
CREATE TABLE data_node.sync_tasks | ||
( | ||
task VARCHAR PRIMARY KEY, | ||
block BIGINT NOT NULL, | ||
processed TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() | ||
); | ||
|
||
-- transfer data from old table to new | ||
INSERT INTO data_node.sync_tasks (task, block) | ||
SELECT 'L1', MAX(block) FROM data_node.sync_info; | ||
|
||
DROP TABLE IF EXISTS data_node.sync_info CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
for x in cdk-data-availability cdk-validium-data-node-db; do | ||
echo $x | ||
for i in 0 1 2 3 4; do | ||
docker kill $x-$i || true | ||
docker rm $x-$i || true | ||
done | ||
done |