MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / sendUpdatedEntries

Method sendUpdatedEntries

tx.go:867–880  ·  view source on GitHub ↗

* * send updated entries to watch manager for monitoring * and specifying the buckets to be deleted * @param pendingWriteList: the list of entries to be sent * @param deletedBuckets: the buckets to be deleted * * * @return: nil if success, error if any */

(pendingWriteList []*core.Entry, deletedBuckets map[core.BucketName]bool)

Source from the content-addressed store, hash-verified

865 * @return: nil if success, error if any
866 */
867func (tx *Tx) sendUpdatedEntries(pendingWriteList []*core.Entry, deletedBuckets map[core.BucketName]bool) {
868 err := tx.db.watchMgr.sendUpdatedEntries(pendingWriteList, deletedBuckets, func(bucketId core.BucketId) (core.BucketName, error) {
869 bucket, err := tx.db.bucketMgr.GetBucketById(bucketId)
870 if err != nil {
871 return "", err
872 }
873
874 return bucket.Name, nil
875 })
876
877 if err != nil {
878 utils.GetLogger().Printf("send updated entries error: %v", err)
879 }
880}
881
882/*
883* send buckets to watch manager for specifying the bucket to be deleted

Callers 1

CommitMethod · 0.95

Calls 3

GetLoggerFunction · 0.92
GetBucketByIdMethod · 0.80
PrintfMethod · 0.65

Tested by

no test coverage detected