Skip to content

Pulsar SQL can not query the latest ingested event in a topic , but Pulsar Consumer/Read always can.  #4976

Closed

Description

@frank-dkvan

Describe the bug
Pulsar SQL can not query the latest ingested event in a topic , but Pulsar Consumer/Read always can.

the testing Pulsar version is 2.4.0

from the two screenshots below, we can see the latest event is always missed in Palsar SQL. but Pulsar reader client can fetch the latest one correctly.

I am new to Pulsar but very interested in Pulsar. don't know this is a bug, or just a kind interesting feature which needs some hidden config I don't know yet?

Screenshots
this is the testing code and screenshot of Pulsar Reader:
image
this is the testing query SQL and screenshot in Pulsar SQL CLI:
image

Activity

  1. added
    type/bug
    on Aug 19, 2019
  2. frank-dkvan commented on Aug 19, 2019

    @frank-dkvan
    Author

    looking at the screenshots above, we can find Pulsar Reader returns 5 records with the latest ingested event, but Pulsar SQL only returns 4 records without the latest ingested event. always missing one latest ingested event from Pulsar SQL while new event comes into Pulsar Topic

  3. sijie commented on Aug 21, 2019

    @sijie
    Member

    @frank-dkvan this is a known issue of #3828. because Pulsar doesn't flush LAC so when Presto SQL reads data from bookkeeper bypassing broker, it will miss the latest message because the advanced LAC is not flushed back.

    The fix is waiting for BK 4.10 release.

  4. added
    area/sql
    on Aug 21, 2019
  5. frank-dkvan commented on Aug 21, 2019

    @frank-dkvan
    Author

    @sijie got it! thanks

  6. frank-dkvan commented on Dec 8, 2019

    @frank-dkvan
    Author

    @frank-dkvan this is a known issue of #3828. because Pulsar doesn't flush LAC so when Presto SQL reads data from bookkeeper bypassing broker, it will miss the latest message because the advanced LAC is not flushed back.

    The fix is waiting for BK 4.10 release.

    @sijie I tested and found this bug hasn't yet been fixed in latest 2.5.0 snapshot with BK 4.10 release.
    will this bug get fixed in 2.5.0 official release? or it there any workaround solution/configuration to solve that?

  7. sijie commented on Dec 8, 2019

    @sijie
    Member

    @frank-dkvan I think it requires a change at Pulsar side. since we are cutting 2.5.0 next week, I don't think we are able to include this in time. We can do this for 2.5.1 or 2.6.0.

    you might be able to work around with 4.10 with a bk client configuraiton. @codelipenghui should be able to help you with this.

  8. frank-dkvan commented on Dec 8, 2019

    @frank-dkvan
    Author

    thanks @sijie
    Hi @codelipenghui wld you pls help with this: providing more details on bk client configuration at pulsar side...sample code if any would be nice..thanks

  9. codelipenghui commented on Dec 9, 2019

    @codelipenghui
    Contributor

    @frank-dkvan @sijie I have create a new pull request #5822 for expose the config in broker.conf.

  10. sijie commented on Dec 9, 2019

    @sijie
    Member

    @frank-dkvan

    I think you can add bookkeeperExplicitLacIntervalInMills=5 in the JVM system properties when starting the broker.

  11. codelipenghui commented on Dec 9, 2019

    @codelipenghui
    Contributor

    @sijie I think we need to use explicitLacInterval, this is the name in Bookkeeper client configuration. The bookkeeperExplicitLacIntervalInMills is named in broker side.

  12. sijie commented on Dec 9, 2019

    @sijie
    Member

    You are right!

  13. frank-dkvan commented on Dec 16, 2019

    @frank-dkvan
    Author

    @frank-dkvan

    I think you can add bookkeeperExplicitLacIntervalInMills=5 in the JVM system properties when starting the broker.

    Hi @codelipenghui "5" means there would be 5-ms delay before we can see the latest message in Pulsar SQL? Am I understanding correctly?

  14. frank-dkvan commented on Dec 16, 2019

    @frank-dkvan
    Author

    @frank-dkvan @sijie I have create a new pull request #5822 for expose the config in broker.conf.

    Thanks @codelipenghui

  15. codelipenghui commented on Feb 10, 2020

    @codelipenghui
    Contributor

    close via #5822

  16. added this to the 2.6.0 milestone on Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/sqltype/bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions