Skip to content

Commit

Permalink
LINT changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sven1977 committed Aug 12, 2021
1 parent 0090265 commit 88666d3
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 36 deletions.
8 changes: 5 additions & 3 deletions src/ray/gcs/gcs_server/gcs_placement_group_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,9 @@ void GcsPlacementGroupManager::WaitPlacementGroup(
}

void GcsPlacementGroupManager::RetryCreatingPlacementGroup() {
execute_after(io_context_, [this] { SchedulePendingPlacementGroups(); },
RayConfig::instance().gcs_create_placement_group_retry_interval_ms());
execute_after(
io_context_, [this] { SchedulePendingPlacementGroups(); },
RayConfig::instance().gcs_create_placement_group_retry_interval_ms());
}

void GcsPlacementGroupManager::OnNodeDead(const NodeID &node_id) {
Expand Down Expand Up @@ -616,7 +617,8 @@ void GcsPlacementGroupManager::CollectStats() const {

void GcsPlacementGroupManager::Tick() {
UpdatePlacementGroupLoad();
execute_after(io_context_, [this] { Tick(); }, 1000 /* milliseconds */);
execute_after(
io_context_, [this] { Tick(); }, 1000 /* milliseconds */);
}

void GcsPlacementGroupManager::UpdatePlacementGroupLoad() {
Expand Down
1 change: 1 addition & 0 deletions src/ray/object_manager/chunk_object_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include "ray/object_manager/chunk_object_reader.h"

#include "ray/util/logging.h"

namespace ray {
Expand Down
1 change: 1 addition & 0 deletions src/ray/object_manager/memory_object_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include "ray/object_manager/memory_object_reader.h"

#include <cstring>

namespace ray {
Expand Down
23 changes: 12 additions & 11 deletions src/ray/object_manager/object_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,17 +476,18 @@ void ObjectManager::PushObjectInternal(const ObjectID &object_id, const NodeID &
[=]() {
// Post to the multithreaded RPC event loop so that data is copied
// off of the main thread.
SendObjectChunk(push_id, object_id, node_id, chunk_id, rpc_client,
[=](const Status &status) {
// Post back to the main event loop because the
// PushManager is thread-safe.
main_service_->post(
[this, node_id, object_id]() {
push_manager_->OnChunkComplete(node_id, object_id);
},
"ObjectManager.Push");
},
std::move(chunk_reader));
SendObjectChunk(
push_id, object_id, node_id, chunk_id, rpc_client,
[=](const Status &status) {
// Post back to the main event loop because the
// PushManager is thread-safe.
main_service_->post(
[this, node_id, object_id]() {
push_manager_->OnChunkComplete(node_id, object_id);
},
"ObjectManager.Push");
},
std::move(chunk_reader));
},
"ObjectManager.Push");
});
Expand Down
9 changes: 3 additions & 6 deletions src/ray/object_manager/plasma/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,24 @@

#include "ray/object_manager/plasma/client.h"

#include <cstring>

#include <algorithm>
#include <boost/asio.hpp>
#include <cstring>
#include <deque>
#include <mutex>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#include <boost/asio.hpp>

#include "absl/container/flat_hash_map.h"
#include "ray/common/asio/instrumented_io_context.h"
#include "ray/common/ray_config.h"
#include "ray/object_manager/plasma/connection.h"
#include "ray/object_manager/plasma/plasma.h"
#include "ray/object_manager/plasma/protocol.h"
#include "ray/object_manager/plasma/shared_memory.h"

#include "absl/container/flat_hash_map.h"

namespace fb = plasma::flatbuf;

namespace plasma {
Expand Down
6 changes: 3 additions & 3 deletions src/ray/object_manager/plasma/plasma_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
// specific language governing permissions and limitations
// under the License.

#include "ray/common/ray_config.h"
#include "ray/util/logging.h"
#include "ray/object_manager/plasma/plasma_allocator.h"

#include "ray/common/ray_config.h"
#include "ray/object_manager/plasma/malloc.h"
#include "ray/object_manager/plasma/plasma_allocator.h"
#include "ray/util/logging.h"

namespace plasma {

Expand Down
18 changes: 10 additions & 8 deletions src/ray/object_manager/plasma/store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -956,12 +956,13 @@ void PlasmaStore::ProcessCreateRequests() {

if (retry_after_ms > 0) {
// Try to process requests later, after space has been made.
create_timer_ = execute_after(io_context_,
[this]() {
create_timer_ = nullptr;
ProcessCreateRequests();
},
retry_after_ms);
create_timer_ = execute_after(
io_context_,
[this]() {
create_timer_ = nullptr;
ProcessCreateRequests();
},
retry_after_ms);
}
}

Expand Down Expand Up @@ -997,8 +998,9 @@ bool PlasmaStore::IsObjectSpillable(const ObjectID &object_id) {
void PlasmaStore::PrintDebugDump() const {
RAY_LOG(INFO) << GetDebugDump();

stats_timer_ = execute_after(io_context_, [this]() { PrintDebugDump(); },
RayConfig::instance().event_stats_print_interval_ms());
stats_timer_ = execute_after(
io_context_, [this]() { PrintDebugDump(); },
RayConfig::instance().event_stats_print_interval_ms());
}

std::string PlasmaStore::GetDebugDump() const {
Expand Down
7 changes: 3 additions & 4 deletions src/ray/object_manager/test/spilled_object_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "ray/object_manager/chunk_object_reader.h"
#include "ray/object_manager/memory_object_reader.h"
#include "ray/object_manager/spilled_object_reader.h"

#include <boost/endian/conversion.hpp>
#include <fstream>

#include "absl/strings/str_format.h"
#include "gtest/gtest.h"
#include "ray/common/test_util.h"
#include "ray/object_manager/chunk_object_reader.h"
#include "ray/object_manager/memory_object_reader.h"
#include "ray/object_manager/spilled_object_reader.h"
#include "ray/util/filesystem.h"

namespace ray {
Expand Down
3 changes: 2 additions & 1 deletion src/ray/raylet/scheduling/cluster_task_manager.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include "ray/raylet/scheduling/cluster_task_manager.h"

#include <google/protobuf/map.h>

#include <boost/functional/hash.hpp>
#include <boost/range/join.hpp>

#include "ray/raylet/scheduling/cluster_task_manager.h"
#include "ray/stats/stats.h"
#include "ray/util/logging.h"

Expand Down

0 comments on commit 88666d3

Please sign in to comment.