Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBG-3945: Fix for panic in _clip method on skipped sequence slice #6842

Merged
merged 1 commit into from
May 28, 2024

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented May 24, 2024

CBG-3945

  • This panic was hit as _clip was trying to clip the capacity of the slice to a value less than the current length of the slice. This was a bug as if threshold is met we should be clipping the capacity to the current length + the clip capacity headroom (default 1000)
  • Added test TestClipSafety for better testing around these scenarios

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

…tter testing for these scenarios in TestClipSafety
@gregns1 gregns1 requested a review from bbrks May 28, 2024 09:37
@bbrks bbrks merged commit 2d5a334 into main May 28, 2024
34 checks passed
@bbrks bbrks deleted the CBG-3945 branch May 28, 2024 10:36
gregns1 added a commit that referenced this pull request Jul 9, 2024
* CBG-3852: Implementation of single sequence entry for skipped sequence slice (#6747)

* CBG-3852: implementation of single sequence entry for skipped sequence slice

* minor updates to make setLastSeq no-op for single values

* updates for review round

* remove not needed comment

* updates based off review

* CBG-3853: Implementation of range sequence entry for skipped sequence slice (#6764)

* CBG-3854: Integration of the skipped sequence slice into the cache (#6789)

* CBG-3854: Integeration of the skipped sequence slice into the cache

* remove old chnages not needed anymore + gh actions failures

* updates based of review. Move stat update to updateStats and alter soem naming. Test updates to reflect stat chnages too.

* remove incorrect incrementing of num current sequences inside PushSkippedSequenceEntry

* Fix race condition in updateStats()

* updates off review

* tidy CleanSkippedSequenceQueue

* stats update

* CBG-3855: Sequence range removal support (#6801)

* CBG-3855: support for seqeuence range removal

* add comment to function + remove repeated code

* refactor error handling, simplify stat calculation update

* CBG-3850: Optimise releaseUnusedSequenceRange  (#6831)

* CBG-3850: Optimise releaseUnusedSequenceRange function + support for ranges in pending queue

* updates to add _pushRangeToPending and _removeSubsetOfRangeFromSkipped to process duplicates sequences between unused rnage and pending/skipped lists

* fix race condition in test

* fix for incorrect logic for removing skipped range

* updates based off review

* updates to fix incorrect code + add extra test coverage of changes

* change error name

* CBG-3945: Fix for panic in _clip method on skipped sequence slice (#6842)

* fix test to use old api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants