You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/08/14 07:22:11 UTC
[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1811: [CELEBORN-888][WORKER]Tweak the logic and add unit tests for the MemoryManager#currentServingState method
pan3793 commented on code in PR #1811:
URL: https://github.com/apache/incubator-celeborn/pull/1811#discussion_r1293065029
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java:
##########
@@ -139,51 +139,56 @@ private MemoryManager(CelebornConf conf) {
readBufferTarget = (long) (readBufferThreshold * readBufferTargetRatio);
memoryShuffleStorageThreshold = (long) (maxDirectorMemory * shuffleStorageRatio);
- checkService.scheduleWithFixedDelay(
- () -> {
- try {
- ServingState lastState = servingState;
- servingState = currentServingState();
- if (lastState != servingState) {
- logger.info("Serving state transformed from {} to {}", lastState, servingState);
- if (servingState == ServingState.PUSH_PAUSED) {
- pausePushDataCounter.increment();
- logger.info("Trigger action: PAUSE PUSH, RESUME REPLICATE");
- memoryPressureListeners.forEach(
- memoryPressureListener ->
- memoryPressureListener.onPause(TransportModuleConstants.PUSH_MODULE));
- memoryPressureListeners.forEach(
- memoryPressureListener ->
- memoryPressureListener.onResume(TransportModuleConstants.REPLICATE_MODULE));
- trimAllListeners();
- } else if (servingState == ServingState.PUSH_AND_REPLICATE_PAUSED) {
- pausePushDataAndReplicateCounter.increment();
- logger.info("Trigger action: PAUSE PUSH and REPLICATE");
- memoryPressureListeners.forEach(
- memoryPressureListener ->
- memoryPressureListener.onPause(TransportModuleConstants.PUSH_MODULE));
- memoryPressureListeners.forEach(
- memoryPressureListener ->
- memoryPressureListener.onPause(TransportModuleConstants.REPLICATE_MODULE));
- trimAllListeners();
+ // disabled trim thread in test case
Review Comment:
this is hacky, and why?
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org