Skip to content

Commit

Permalink
support event pool (#1817)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryzhx8 authored Oct 29, 2024
1 parent ae0f53f commit a4f84b3
Show file tree
Hide file tree
Showing 55 changed files with 1,306 additions and 401 deletions.
8 changes: 4 additions & 4 deletions core/app_config/AppConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <functional>

#include "InstanceConfig.h"
#include "common/Lock.h"
#include "protobuf/sls/sls_logs.pb.h"

namespace logtail {
Expand Down Expand Up @@ -94,7 +94,7 @@ class AppConfig {

Json::Value mFileTagsJson;

mutable SpinLock mAppConfigLock;
mutable std::mutex mAppConfigLock;

// loongcollector_config.json content for rebuild
std::string mIlogtailConfigJson;
Expand Down Expand Up @@ -267,7 +267,7 @@ class AppConfig {
void LoadOtherConf(const Json::Value& confJson);
// void LoadGlobalFuseConf(const Json::Value& confJson);
void SetIlogtailConfigJson(const std::string& configJson) {
ScopedSpinLock lock(mAppConfigLock);
std::lock_guard<std::mutex> lock(mAppConfigLock);
mIlogtailConfigJson = configJson;
}
// LoadEnvTags loads env tags from environment.
Expand Down Expand Up @@ -395,7 +395,7 @@ class AppConfig {
// bool GetOpenStreamLog() const { return mOpenStreamLog; }

std::string GetIlogtailConfigJson() {
ScopedSpinLock lock(mAppConfigLock);
std::lock_guard<std::mutex> lock(mAppConfigLock);
return mIlogtailConfigJson;
}

Expand Down
176 changes: 0 additions & 176 deletions core/common/LogstoreFeedbackQueue.h

This file was deleted.

5 changes: 0 additions & 5 deletions core/config/InstanceConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@
#pragma once

#include <json/json.h>
#include <re2/re2.h>

#include <cstdint>
#include <filesystem>
#include <memory>
#include <string>
#include <vector>

namespace logtail {

Expand Down
Loading

0 comments on commit a4f84b3

Please sign in to comment.