Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Conversation

@sezruby
Copy link
Collaborator

@sezruby sezruby commented Nov 2, 2020

What is the context for this pull request?

Fixes #174
Fixes #169

What changes were proposed in this pull request?

Support quick refresh of indexes which only updates the metadata - Update data - of the index.

hs.refreshIndex("indexName", "quick")

After the refresh, the latest signature will be used for index selection process (getCandidateIndexes) and the appended files and deleted files of Update will be handled by Hybrid Scan.

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Unit test

@sezruby sezruby added this to the November 2020 milestone Nov 2, 2020
@sezruby sezruby added the enhancement New feature or request label Nov 2, 2020
@sezruby sezruby self-assigned this Nov 5, 2020
// In case the index has appended files and/or deleted files which are updated by quick
// refresh mode, we should handle them in query time by using Hybrid Scan.
// Because quick refresh doesn't update index data, but just metadata in IndexLogEntry.
lazy val quickRefreshedIndex = index.hasSourceUpdate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are using it only once, do we need to create a separate (lazy) val for it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mainly for readability and comments. + It's only required when HybridScan is enabled, so it's lazy val.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a comment if you added lazy to avoid creating sets for appended files, etc.

@sezruby
Copy link
Collaborator Author

sezruby commented Nov 25, 2020

@imback82 @pirz @apoorvedave1 Could you review this change? Thanks!

pirz
pirz previously approved these changes Dec 2, 2020
Copy link
Contributor

@pirz pirz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @sezruby

@apoorvedave1
Copy link
Contributor

LGTM, thanks @sezruby

Copy link
Contributor

@imback82 imback82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (few minor points), thanks @sezruby!

// In case the index has appended files and/or deleted files which are updated by quick
// refresh mode, we should handle them in query time by using Hybrid Scan.
// Because quick refresh doesn't update index data, but just metadata in IndexLogEntry.
lazy val quickRefreshedIndex = index.hasSourceUpdate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a comment if you added lazy to avoid creating sets for appended files, etc.

imback82
imback82 previously approved these changes Dec 3, 2020
(index.sourceFileInfoSet -- exist, filesAppended)
if (!HyperspaceConf.hybridScanEnabled(spark) && index.hasSourceUpdate) {
// If the index contains the source update info, we need to handle
// appendedFiles and deletedFiles in IndexLogEntry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add back the comment that signature validation was done by this time?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged this PR. Can you address this either in #164 or #265?

@imback82 imback82 merged commit 50f9806 into microsoft:master Dec 3, 2020
@sezruby sezruby deleted the quickrefresh branch January 14, 2021 08:28
@imback82 imback82 modified the milestones: November 2020, January 2021 Jan 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

4 participants