(bucketId core.BucketId, entry *core.Entry)
| 364 | } |
| 365 | |
| 366 | func (tx *Tx) getKvEntryNewAddRecordCount(bucketId core.BucketId, entry *core.Entry) (int64, error) { |
| 367 | var res int64 |
| 368 | |
| 369 | switch entry.Meta.Flag { |
| 370 | case DataDeleteFlag: |
| 371 | res-- |
| 372 | case DataSetFlag: |
| 373 | if idx, ok := tx.db.Index.BTree.exist(bucketId); ok { |
| 374 | _, found := idx.Find(entry.Key) |
| 375 | if !found { |
| 376 | res++ |
| 377 | } |
| 378 | } else { |
| 379 | res++ |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | return res, nil |
| 384 | } |
| 385 | |
| 386 | func (tx *Tx) getSetEntryNewAddRecordCount(_ core.BucketId, entry *core.Entry) (int64, error) { |
| 387 | var res int64 |
no test coverage detected