GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 3.x: Fix takeLast(time) last events time window calculation. by akarnokd · Pull Request #6648 · ReactiveX/RxJava

Conversation

@akarnokd

@akarnokd akarnokd commented Sep 11, 2019

Copy link
Copy Markdown
Member

The logic inside the Observable.takeLast(time) was not using a fixed timestamp to compare against but one that could change between calls, resulting in items wrongly skipped from the accumulated buffer. The PR makes this timestamp limit fixed outside the drain loop.

The Flowable variant did not have the issue but both received the unit test verifying the correct behavior.

The same fix for 2.x will be posted separately.

Fixes: #6647

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@akarnokd
3.x: Fix takeLast(time) last events time window calculation.
014c1be
@akarnokd akarnokd added Bug 3.x labels Sep 11, 2019
@akarnokd akarnokd added this to the 3.0 milestone Sep 11, 2019
@akarnokd akarnokd mentioned this pull request Sep 11, 2019
3.0.0-RC3 release preparations #6649
Closed
@codecov

codecov Bot commented Sep 11, 2019

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (3.x@9a36930). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##             3.x   #6648   +/-   ##
=====================================
  Coverage       ?   98.1%           
  Complexity     ?    6191           
=====================================
  Files          ?     678           
  Lines          ?   44722           
  Branches       ?    6176           
=====================================
  Hits           ?   43875           
  Misses         ?     295           
  Partials       ?     552
Impacted Files Coverage Δ Complexity Δ
.../operators/observable/ObservableTakeLastTimed.java 98.68% <100%> (ø) 2 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a36930...014c1be. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vanniktech
vanniktech approved these changes Sep 12, 2019
View reviewed changes
@akarnokd
akarnokd merged commit 852e052 into ReactiveX:3.x Sep 12, 2019
@akarnokd
akarnokd deleted the TakeLastWindowFix branch September 12, 2019 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@vanniktech vanniktech vanniktech approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

3.x Bug

Projects

None yet

Milestone

3.0

Development

Successfully merging this pull request may close these issues.

2.x: confused of method takeLast(long,TimeUnit)

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@akarnokd @vanniktech
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.