Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Initial commit of POC for index prefetch * version * Disable readyourqrites * Handle embedded keys in index entries * Small fixes. DisableReadYourWrites for tests, add plan constructor * Add props to control which API to use. Custom unpacking. range scan in FDB. * new test * Finalize implementation: 1. Create IndexedRawRecord to hold indexed unsplit records 2. Unsplit the records in the index maintainer 3. Test reads 4. Deserialize records * Handle new API * Code cleanup - move unsplit records to record store Support fallback execution * Changes after rebase, style. * Reimplement integration with planner after rebase, added tests with fallback and comparator plan * Support old version format, test. * Changes after getting latest FDB API * Latest changes from main branch. Add split record tests, fix performance tests, add prefetch tests to performance framework, cleanup code. * Code style and findbugs changes. * Handle old format * Fixes while running all tests: - Don't use prefetch when no common primary key - Don't use prefetch for non-VALUE indexes - Fix counter event * Fallback mode for cases where the failure happens in the Async Future's onNext() call. - Add FallbackCursor - Use the cursor in fallback mode - Tests for read-your-writes mode that exhibit this kind of failure * Added handling of IndexOrphanBehavior: In case there are no record splits for an index entry, return empty entry, skip record or abort. Added tests. * Changes after rebase from main and checkstyle * Add better names to test * Disable failing test * Add mixed continuations test * Add comments, javadoc and @nonnull annotations. Review comments; Fix type issues with generics: Add serialized and changed <Message> to <M>, removed redundant queriedRecordOfMessage method. Move tests to foundationdb package. * Add version protection, fix test names. Adjust two tests that would normally throw in prefetch mode to not throw exception since 630 API VERSION will cause the tests to run in scan mdoe. * Fix sonarcube issue: CommonPromaryKey is @nonnull * Fix sonarcube issues * Dummy commit to launch build * More sonar attempts * Update fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/cursors/FallbackCursor.java Co-authored-by: Alec Grieser <alloc@apple.com> * PR Comments phase 1: Non-test code: - Renamed "Index Prefetch" to "Remote Fetch" to avoid confusion with the other "prefetch". This includes parameters, method, enums and comments. - Fixed a bug in the FallbackCursor that did not initialize nextResult. Removed nextResult and replaced with usage of nextResultFuture. - FallbackCursor always use inner's executor. - Simplified logic for FallBackCursor processing - Replaced usage of TupleRange with IndexScanBounds - Moved HopInfo (Mapper) creation to IndexMaintainer. - Check for API_VERSION and scan type in the store scanIndexRemoteFetchInternal method to get protection even when not using queries. - Counting index entries in the byte count. - Added new timer entry to count prefetch. - Changed log from error to warning. - Check API version on executePlan to allow for version to change during runtime. - Remove PlanWithIndex.getComparisons() as it is no longer needed. * PR Comments: Remove `getCommonPrimaryKey` from the interface * PR Comments: - Refactor tests to extend a common baseclass - Wrapped FallbackCursor exception with another exception with a descriptive message - Removed index and indexSubspace from param list for createRemoteFetchMapper - Marked public methods as API.Status.EXPERIMENTAL - Fix bugs with logging too many warnings in executePlan - Added test with index that has primary key component - Fixed tests to handle different behavior per API_VERSION * Sonar issues: - Changed future.get() to future.join() to simplify exception handling - Suppress parent warning for exceptions - Description of ignored test * Test failures: Reduce overall size of transaction for large record test. Wrap exception from FallbackCursor to simplify exception handling between fallback and non-fallback executions. * Dummy commit to kick off build * PR Comments: - Add exception wrapping logic in FallbackCursor in the case where the handed exception is not wrapped - Remove recordSubspace parameter from IndexMaintainer.scanRemoteFetch - Turn warning messages to debug for the cases where commonPrimaryKey is null and index type is not VALUE in IndexPLan - Add assertions on the failure cause in FallbackCursorTest - Added RemoteFetchMultiColumnKeyTest - Replaced OrphanPolicyTests with end-to-end test - Added tests for both in-range and out-of-range read-your-writes * Release notes Co-authored-by: Alec Grieser <alloc@apple.com>
- Loading branch information