-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Shorted the seal timeout judgemet from 30 minutes to 5 minutes for…
… fast timeout to avoid pending file queue jam, which may leads to more file seal timeout because the file copy may have been removed from the original IPFS node if the file waits too long time in the queue. 2. Implement retry mechanism for seal failed records. 3. For the probability filter, the pTake value should divide by GroupCount instead of nodeCount, because one group can have only one replica.
- Loading branch information
1 parent
d0b28a8
commit 6b68ed7
Showing
10 changed files
with
114 additions
and
14 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
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,41 @@ | ||
import { DataTypes, QueryInterface } from 'sequelize'; | ||
import { MigrationFn } from 'umzug'; | ||
import { withTransaction } from '../db-utils'; | ||
|
||
export const up: MigrationFn<QueryInterface> = async ({ | ||
context: sequelize, | ||
}) => { | ||
await withTransaction(sequelize, async (transaction) => { | ||
await sequelize.addColumn( | ||
'file_record', | ||
'retry_count', | ||
{ | ||
type: DataTypes.INTEGER, | ||
allowNull: true, | ||
defaultValue: 0, | ||
}, | ||
{ | ||
transaction, | ||
}, | ||
); | ||
|
||
await sequelize.addColumn( | ||
'pin_record', | ||
'file_record_id', | ||
{ | ||
type: DataTypes.INTEGER, | ||
allowNull: true, | ||
}, | ||
{ | ||
transaction, | ||
}, | ||
); | ||
}); | ||
}; | ||
|
||
export const down: MigrationFn<QueryInterface> = async ({ | ||
context: sequelize, | ||
}) => { | ||
await sequelize.removeColumn('pin_record', 'file_record_id'); | ||
await sequelize.removeColumn('file_record', 'retry_count'); | ||
}; |
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
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