You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Hai Lu (Jira)" <ji...@apache.org> on 2019/11/07 00:06:03 UTC

[jira] [Updated] (SAMZA-2297) InMemorySystemAdmin offsets are off-by-one in some cases

     [ https://issues.apache.org/jira/browse/SAMZA-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hai Lu updated SAMZA-2297:
--------------------------
    Fix Version/s: 1.3

> InMemorySystemAdmin offsets are off-by-one in some cases
> --------------------------------------------------------
>
>                 Key: SAMZA-2297
>                 URL: https://issues.apache.org/jira/browse/SAMZA-2297
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Cameron Lee
>            Assignee: Cameron Lee
>            Priority: Major
>             Fix For: 1.3
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> # When a stream is empty for an "InMemory" system, the admin returns that the oldest/newest offset is "0" and the upcoming offset is "1".
>  # The "newest" offset returned by the admin is one higher than the offset of the last message in the list. Therefore, consuming from this offset would give no messages.
>  # The "upcoming" offset returned by the admin is two higher than the offset of the last message in the list. However, the next message actually gets an offset which is (offset of the last message + 1).
> For case (1), when using UPCOMING offsets, this results in missing the first message in a stream when the job starts while the stream is empty but then messages get produced to the stream. The current usages use the InMemorySystemDescriptor which uses OLDEST offsets, so this issue is not observed in the current tests. However, internal streams don't use the descriptor, so when trying to move some other tests to an in-memory system, those tests run into this problem.
> For case (2)/(3), the current usage of the in-memory system doesn't seem to be impacted. It seems to be because the newest/upcoming offsets aren't used to consume in the current tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)