mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 01:53:42 +01:00
Merge pull request #1016 from surik/filestore-index-deletion-optimisation
Do not persist filestore when deleting indices
This commit is contained in:
commit
9e540cd5b4
@ -334,7 +334,7 @@ func (s *FileStore) DeleteHashedPAT2TokenIDIndex(hashedToken string) error {
|
|||||||
|
|
||||||
delete(s.HashedPAT2TokenID, hashedToken)
|
delete(s.HashedPAT2TokenID, hashedToken)
|
||||||
|
|
||||||
return s.persist(s.storeFile)
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteTokenID2UserIDIndex removes an entry from the indexing map TokenID2UserID
|
// DeleteTokenID2UserIDIndex removes an entry from the indexing map TokenID2UserID
|
||||||
@ -344,7 +344,7 @@ func (s *FileStore) DeleteTokenID2UserIDIndex(tokenID string) error {
|
|||||||
|
|
||||||
delete(s.TokenID2UserID, tokenID)
|
delete(s.TokenID2UserID, tokenID)
|
||||||
|
|
||||||
return s.persist(s.storeFile)
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetAccountByPrivateDomain returns account by private domain
|
// GetAccountByPrivateDomain returns account by private domain
|
||||||
|
Loading…
Reference in New Issue
Block a user