8000 Feature/new server infra by maierlars · Pull Request #7733 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Feature/new server infra #7733

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

Merged
merged 42 commits into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6f3593b
Decoupled IO handling from Scheduler.
Jul 23, 2018
1bd0db0
Fixed SSL start up bug.
Jul 24, 2018
0a3fe50
Replaced Scheduler with new worker farm implementation.
Jul 25, 2018
0400054
Added minimal statistics and info string for Scheduler.
Jul 25, 2018
bc0f94c
Added support for timed submissions.
Jul 27, 2018
fdd2033
Updated delayed submission api. Updated code that used timers.
Jul 31, 2018
3cb9b62
Extracted new Scheduler into a virtual parent class. The implementati…
Aug 1, 2018
bdc8d9b
Signal handler now working.
Aug 1, 2018
3796c3b
Changed threads names, `_stop` is atomic, check for failure during th…
Aug 2, 2018
5e6a3f2
Commented on source code and added TODOs.
Aug 3, 2018
e9ccd72
Merge branch 'devel' into feature/new-server-infra
Aug 3, 2018
0e99af6
Played around with start-stop-conditions
Aug 8, 2018
6fd7f26
Play around with start stop condition.
Aug 8, 2018
e65585c
start stop cond
Aug 8, 2018
c6ac00f
Sart Stop Conditions
Aug 8, 2018
a5516b2
Removed bad cv_status check.
Aug 9, 2018
3e12cb0
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Aug 10, 2018
aa6672c
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Aug 10, 2018
43fb2d9
Bug fix: now compare the actual objects instead of pointer values. Se…
Aug 10, 2018
c6a54c1
Moved most of the stuff now unrelated to the Scheduler to GeneralServ…
Aug 13, 2018
556f3e9
Instead of waiting for a thread to terminate, put it on a clean up li…
Aug 15, 2018
0ed5f82
Allow detaching long running threads.
Aug 15, 2018
20132a0
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Dec 11, 2018
e2fc7e1
Fixed test mock.
Dec 12, 2018
ebcd63a
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Dec 17, 2018
d186d14
Updated the WorkHandle logic. Removed post functions.
Dec 18, 2018
80c9f6a
Fixed crash when obtaining shared_ptr from this in destructor.
Dec 18, 2018
fdff089
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Dec 18, 2018
a61a809
Added lost mutex.
Dec 18, 2018
8d4c003
Fixed memory leak.
Dec 18, 2018
3ff4806
Fixed merge bug.
Dec 18, 2018
e2fa338
Changed a lot of code to optimize the scheduler.
Dec 19, 2018
090e2cd
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Dec 19, 2018
b37d5fd
Fixed bug of invalidated iterator. Dont remove task on shutdown at di…
Dec 19, 2018
2ccf743
Only by value calls to queue.
Dec 20, 2018
947fe2f
Added options again.
Dec 20, 2018
992e44c
Clean up of code.
Dec 20, 2018
b6bbc8c
UI Request Lane added.
Dec 20, 2018
1e8d3bd
Bug fixes in Scheduler.
Dec 21, 2018
4d6b0a0
Merge remote-tracking branch 'origin/devel' into feature/new-server-i…
Jan 7, 2019
83a775e
Applied reformat.
Jan 7, 2019
55e70a3
Use sigaction.
Jan 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added lost mutex.
  • Loading branch information
lamai93 committed Dec 18, 2018
commit a61a809dd47fca8472d635f599a4882c65e26e3d
7 changes: 7 additions & 0 deletions arangod/VocBase/Methods/Tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ void Task::start() {
ExecContext::CURRENT->isAdminUser() ||
(!_user.empty() && ExecContext::CURRENT->user() == _user));

{
MUTEX_LOCKER(lock, _taskHandleMutex);
_taskHandle.reset();
}

if (_offset.count() <= 0) {
_offset = std::chrono::microseconds(1);
}
Expand All @@ -314,12 +319,14 @@ void Task::start() {
}

void Task::queue(std::chrono::microseconds offset) {
MUTEX_LOCKER(lock, _taskHandleMutex);
_taskHandle = SchedulerFeature::SCHEDULER->queueDelay(RequestLane::INTERNAL_LOW, offset, callbackFunction());
}

void Task::cancel() {
// this will prevent the task from dispatching itself again
_periodic.store(false);
MUTEX_LOCKER(lock, _taskHandleMutex);
_taskHandle.reset();
}

Expand Down
1 change: 1 addition & 0 deletions arangod/VocBase/Methods/Tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Task : public std::enable_shared_from_this<Task> {
std::string _user;

rest::Scheduler::WorkHandle _taskHandle;
Mutex _taskHandleMutex;

// guard to make sure the database is not dropped while used by us
std::unique_ptr<DatabaseGuard> _dbGuard;
Expand Down
0