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

New History APIs #632

Merged
merged 8 commits into from Feb 13, 2019

Conversation

@thomcc
Copy link
Contributor

commented Feb 7, 2019

This implements the things requested in #621 and #619.

I'll add pruning soonish, needs some thought.

@thomcc thomcc requested a review from linacambridge Feb 7, 2019

@thomcc thomcc requested a review from mhammond Feb 7, 2019

@thomcc

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2019

Pruning will probably be its own PR, and not part of this.

@mhammond
Copy link
Member

left a comment

This looks fine to me although I'm not convinced we should expose deleteEverything() yet - the semantics are very unclear (ie, the end result can't reasonably be predicted by the user), it behaves significantly differently from the way desktop behaves, and I can't imagine how we would document what this does so the user can understand the implications. In short, I can't imagine a scenario where this behaviour matches the user's intent. If they really want to delete all history from sync, we should wipe the server (edit: or maybe we should ensure every item on the server has a tombstone - not clear - but this "partial delete" seems problematic)

Do you think we can split that from this patch into a new PR and hand-ball it to Alex and/or Ryan?

@thomcc

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2019

Hmm, sure. Extracting it isn't a problem, but I expect we'll get (somewhat deserved) pushback. Again, it's only a problem for sync users, which aren't all (or even most) users.

I also disagree that wiping the server is the right choice. That will leave most of the visits on remote devices.

If we're going that far, what we might really want to wipe the server and also send a clients engine command to tell the other devices to wipe their clients, maybe.

And I don't think we can realistically say that we won't implement deleteEverything until we e.g. implement the clients engine so we can send that command.

Edit: That said, I don't mind removing it. Its absence shouldn't block anyone as they can just call the range delete manually (which is all it does).

@mhammond

This comment has been minimized.

Copy link
Member

commented Feb 8, 2019

Extracting it isn't a problem, but I expect we'll get (somewhat deserved) pushback. Again, it's only a problem for sync users, which aren't all (or even most) users.

Yeah, fair enough. I'd really just like explicit buy-in from product on this if possible.

And I don't think we can realistically say that we won't implement deleteEverything until we e.g. implement the clients engine so we can send that command.

That's probably true too, but I'd rather ensure we are explicit about this decision than it being an "accidental implementation detail"

@thomcc thomcc force-pushed the history-apis branch 2 times, most recently from 2d739b5 to 6be87da Feb 8, 2019

@thomcc

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2019

@mhammond I've removed delete_everything (which was pretty trivial anyway) and filed #647.

@linacambridge
Copy link
Member

left a comment

Thanks! This looks great overall, though I'd like to see it again with comments addressed (or dropped!).

components/places/src/db/schema.rs Show resolved Hide resolved
components/places/src/db/schema.rs Outdated Show resolved Hide resolved
components/places/src/db/schema.rs Outdated Show resolved Hide resolved
components/places/src/storage/history.rs Outdated Show resolved Hide resolved
components/places/src/storage/history.rs Outdated Show resolved Hide resolved
components/places/src/storage/history.rs Outdated Show resolved Hide resolved
components/places/src/storage/history.rs Outdated Show resolved Hide resolved

@thomcc thomcc force-pushed the history-apis branch from 6be87da to 38e57c8 Feb 8, 2019

@thomcc thomcc force-pushed the history-apis branch from 38e57c8 to 8925dbd Feb 8, 2019

@mhammond
Copy link
Member

left a comment

Looks great, thanks!

@rfk rfk added the review label Feb 12, 2019

@rfk rfk added this to the History API - v1 milestone Feb 12, 2019

thomcc added some commits Feb 7, 2019

@thomcc thomcc force-pushed the history-apis branch from 8925dbd to 3f630c7 Feb 13, 2019

thomcc added some commits Feb 8, 2019

@thomcc thomcc force-pushed the history-apis branch from 3f630c7 to aea5440 Feb 13, 2019

@thomcc thomcc merged commit a027587 into master Feb 13, 2019

1 of 6 checks passed

Taskcluster (pull_request) TaskGroup: Pending (for pull_request.synchronize)
Details
ci/circleci: Rust benchmarks CircleCI is running your tests
Details
ci/circleci: Rust tests - beta CircleCI is running your tests
Details
ci/circleci: Rust tests - stable CircleCI is running your tests
Details
ci/circleci: Sync integration tests CircleCI is running your tests
Details
ci/circleci: Check Rust formatting Your tests passed on CircleCI!
Details

@thomcc thomcc deleted the history-apis branch Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.