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

Sync write through worker #17502

Merged
merged 29 commits into from
Jun 2, 2023

Conversation

JiamingMai
Copy link
Contributor

@JiamingMai JiamingMai commented May 26, 2023

This PR implements the "sync write through worker" feature that supports writing data to Alluxio DORA and UFS in "sync" way.

@JiamingMai JiamingMai changed the title [WIP] Sync write through worker Sync write through worker May 30, 2023
@JiamingMai JiamingMai added the type-feature This issue is a feature request label May 30, 2023
@JiamingMai JiamingMai self-assigned this May 30, 2023
Signed-off-by: Huang Hua <huanghua78@msn.com>
Copy link
Contributor

@jiacheliu3 jiacheliu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments, PTAL thanks!

Copy link
Contributor

@jiacheliu3 jiacheliu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments, PTAL thanks!

Comment on lines 108 to 112
if (!mUnderStorageType.isSyncPersist()) {
mUnderStorageOutputStream = null;
} else { // Write is through to the under storage, create mUnderStorageOutputStream.
mUnderStorageOutputStream = ufsOutStream;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only deal with syncPersist writes currently, so this check is unnecessary, and mUnderStorageOutputStream must be non-null.

Signed-off-by: Huang Hua <huanghua78@msn.com>
@LuQQiu
Copy link
Contributor

LuQQiu commented Jun 1, 2023

@JiamingMai Does DoraFileOutStream has some simple tests?

@LuQQiu
Copy link
Contributor

LuQQiu commented Jun 1, 2023

Some high level suggestions

  • Write to UFS first, write to Dora later <-- avoid data corruption
  • If write to UFS succeed, write to Dora failed should be tolerated, return success to user

Signed-off-by: Huang Hua <huanghua78@msn.com>
Signed-off-by: Huang Hua <huanghua78@msn.com>
@JiamingMai
Copy link
Contributor Author

Some high level suggestions

  • Write to UFS first, write to Dora later <-- avoid data corruption
  • If write to UFS succeed, write to Dora failed should be tolerated, return success to user

Good idea!

@JiamingMai
Copy link
Contributor Author

JiamingMai commented Jun 2, 2023

@JiamingMai Does DoraFileOutStream has some simple tests?

I think the existing tests have already covered this class.

@beinan
Copy link
Contributor

beinan commented Jun 2, 2023

alluxio-bot, merge this please.

@alluxio-bot alluxio-bot merged commit 61d24a7 into Alluxio:main Jun 2, 2023
@JiamingMai JiamingMai deleted the sync-write-through-worker branch June 25, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature This issue is a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants