mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Fix bugs
This commit is contained in:
parent
2e8138dffd
commit
28c2249b25
|
|
@ -285,6 +285,7 @@ func (d *Database) AddState(
|
|||
) (stateNID types.StateSnapshotNID, err error) {
|
||||
err = common.WithTransaction(d.db, func(txn *sql.Tx) error {
|
||||
if len(state) > 0 {
|
||||
var stateBlockNID types.StateBlockNID
|
||||
stateBlockNID, err = d.statements.selectNextStateBlockNID(ctx, txn)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ func NewSyncServerDatasource(dataSourceName string) (*SyncServerDatasource, erro
|
|||
return &d, nil
|
||||
}
|
||||
|
||||
func (d *SyncServerDataSource) prepare() error {
|
||||
func (d *SyncServerDatasource) prepare() (err error) {
|
||||
if err = d.PartitionOffsetStatements.Prepare(d.db, "syncapi"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue