xianjingfeng commented on code in PR #383:
URL: https://github.com/apache/incubator-uniffle/pull/383#discussion_r1037814703
##########
server/src/main/java/org/apache/uniffle/server/ShuffleDataFlushEvent.java:
##########
@@ -36,6 +38,9 @@ public class ShuffleDataFlushEvent {
private final Supplier<Boolean> valid;
private final ShuffleBuffer shuffleBuffer;
private final AtomicInteger retryTimes = new AtomicInteger();
+ private boolean isPended = false;
+ private StorageManager underStorageManager;
Review Comment:
> I have two directions to improve this part of MultiStorageManager
>
> 1. Remove the `storageManagerCache` , it looks unused and bring some
problems. One possible problem I have seen is that, when one event enters into
pending queue due to storage cannot write, it will not have a chance to get a
new fallback strategy due to cache.
> 2. Avoid changing the external reference object in `write` method. If we
want to fallback write to other storage. We could use the invoking sequence
like. (selectStorage -> write) if failed and then (selectStorage -> write),
instead of selectStorage -> write (failed) -> write(choose other storage in
this method). That means we should change the fallback strategy invoked from
`write` method to `selectStorage` method.
@zuston If we use this solution you proposed in #235, i think we don't need
maintain this relation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]