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

Broker may lost messages in extreme condition #5235

Closed
JosephChanChan opened this issue Sep 30, 2022 · 4 comments
Closed

Broker may lost messages in extreme condition #5235

JosephChanChan opened this issue Sep 30, 2022 · 4 comments
Labels

Comments

@JosephChanChan
Copy link

There a problem when mapfile flush message to disk.
details see: #3129

The measures bellow:

  • message property: MessageConst.PROPERTY_WAIT_STORE_MSG_OK to true
  • broker config : flushDiskType=FlushDiskType.SYNC_FLUSH

It can't ensure a message could be flush to disk. the flushedPosition would updated to writePosition even if a error was occurred. then return a PUT_OK result to producer in GroupCommitService.doCommit function

image

there some messages will be lost if power off now, and the producer has been received a ok response.

@labazhou2018
Copy link
Contributor

In most case, the data in pageCache , it is safe.
When the message is in MappedByteBuffer or FileChannel, RocketMQ think the message is safe.
Java Program call flush(), then system flush data from pageCache to disk( it only depends on system)

@labazhou2018
Copy link
Contributor

labazhou2018 commented Oct 1, 2022

broker config : flushDiskType=FlushDiskType.SYNC_FLUSH,should use "this.mappedByteBuffer.force()"
image

MappedByteBuffer force():
image

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.

@github-actions github-actions bot added the stale label Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

This issue was closed because it has been inactive for 3 days since being marked as stale.

@github-actions github-actions bot closed this as completed Oct 8, 2023
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

2 participants