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

events could be duplicated between real time/long polling event calls #32

Open
mblackstock opened this issue Apr 26, 2013 · 0 comments
Open
Labels

Comments

@mblackstock
Copy link
Member

Reviewed the code - I think this is a bug, but we need a test.

The logic for getting real time events is:

    List<Event> events = eventDao.getEvents(t, queryParams, filter);

    if (events.size() > 0)
        return events;

    return realTimeEventService.getEvents(a.getId(), t, waitTime, filter);

We can get the same event twice if the database stores an event and the queryParams includes it. The first call could call realTimeEventService.getEvents(), allocating a real time buffer. The next call to get events could get the events from the dao. The third next call could get the same event from the real time queue since the buffer is allocated.

To fix, we should have a parameter to explicity say whether we want real time or historical events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant