ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.495 by root, Tue Nov 10 04:38:45 2009 UTC vs.
Revision 1.511 by root, Wed Apr 7 18:35:56 2010 UTC

1# 1#
2# This file is part of Deliantra, the Roguelike Realtime MMORPG. 2# This file is part of Deliantra, the Roguelike Realtime MMORPG.
3# 3#
4# Copyright (©) 2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4# Copyright (©) 2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5# 5#
6# Deliantra is free software: you can redistribute it and/or modify it under 6# Deliantra is free software: you can redistribute it and/or modify it under
7# the terms of the Affero GNU General Public License as published by the 7# the terms of the Affero GNU General Public License as published by the
8# Free Software Foundation, either version 3 of the License, or (at your 8# Free Software Foundation, either version 3 of the License, or (at your
9# option) any later version. 9# option) any later version.
53use Coro::Util (); 53use Coro::Util ();
54 54
55use JSON::XS 2.01 (); 55use JSON::XS 2.01 ();
56use BDB (); 56use BDB ();
57use Data::Dumper; 57use Data::Dumper;
58use Digest::MD5;
59use Fcntl; 58use Fcntl;
60use YAML::XS (); 59use YAML::XS ();
61use IO::AIO (); 60use IO::AIO ();
62use Time::HiRes; 61use Time::HiRes;
63use Compress::LZF; 62use Compress::LZF;
424 423
425=cut 424=cut
426 425
427our @SLOT_QUEUE; 426our @SLOT_QUEUE;
428our $SLOT_QUEUE; 427our $SLOT_QUEUE;
428our $SLOT_DECAY = 0.9;
429 429
430$SLOT_QUEUE->cancel if $SLOT_QUEUE; 430$SLOT_QUEUE->cancel if $SLOT_QUEUE;
431$SLOT_QUEUE = Coro::async { 431$SLOT_QUEUE = Coro::async {
432 $Coro::current->desc ("timeslot manager"); 432 $Coro::current->desc ("timeslot manager");
433 433
434 my $signal = new Coro::Signal; 434 my $signal = new Coro::Signal;
435 my $busy;
435 436
436 while () { 437 while () {
437 next_job: 438 next_job:
439
438 my $avail = cf::till_tick; 440 my $avail = cf::till_tick;
439 if ($avail > 0.01) { 441
440 for (0 .. $#SLOT_QUEUE) { 442 for (0 .. $#SLOT_QUEUE) {
441 if ($SLOT_QUEUE[$_][0] < $avail) { 443 if ($SLOT_QUEUE[$_][0] <= $avail) {
444 $busy = 0;
442 my $job = splice @SLOT_QUEUE, $_, 1, (); 445 my $job = splice @SLOT_QUEUE, $_, 1, ();
443 $job->[2]->send; 446 $job->[2]->send;
444 Coro::cede; 447 Coro::cede;
445 goto next_job; 448 goto next_job;
446 } 449 } else {
450 $SLOT_QUEUE[$_][0] *= $SLOT_DECAY;
447 } 451 }
448 } 452 }
449 453
450 if (@SLOT_QUEUE) { 454 if (@SLOT_QUEUE) {
451 # we do not use wait_for_tick() as it returns immediately when tick is inactive 455 # we do not use wait_for_tick() as it returns immediately when tick is inactive
452 push @cf::WAIT_FOR_TICK, $signal; 456 push @cf::WAIT_FOR_TICK, $signal;
453 $signal->wait; 457 $signal->wait;
454 } else { 458 } else {
459 $busy = 0;
455 Coro::schedule; 460 Coro::schedule;
456 } 461 }
457 } 462 }
458}; 463};
459 464
460sub get_slot($;$$) { 465sub get_slot($;$$) {
461 return if tick_inhibit || $Coro::current == $Coro::main; 466 return if tick_inhibit || $Coro::current == $Coro::main;
462 467
463 my ($time, $pri, $name) = @_; 468 my ($time, $pri, $name) = @_;
464 469
465 $time = $TICK * .6 if $time > $TICK * .6; 470 $time = clamp $time, 0.01, $TICK * .6;
471
466 my $sig = new Coro::Signal; 472 my $sig = new Coro::Signal;
467 473
468 push @SLOT_QUEUE, [$time, $pri, $sig, $name]; 474 push @SLOT_QUEUE, [$time, $pri, $sig, $name];
469 @SLOT_QUEUE = sort { $b->[1] <=> $a->[1] } @SLOT_QUEUE; 475 @SLOT_QUEUE = sort { $b->[1] <=> $a->[1] } @SLOT_QUEUE;
470 $SLOT_QUEUE->ready; 476 $SLOT_QUEUE->ready;
1304} 1310}
1305 1311
1306use File::Glob (); 1312use File::Glob ();
1307 1313
1308cf::player->attach ( 1314cf::player->attach (
1309 on_command => sub { 1315 on_unknown_command => sub {
1310 my ($pl, $name, $params) = @_; 1316 my ($pl, $name, $params) = @_;
1311 1317
1312 my $cb = $COMMAND{$name} 1318 my $cb = $COMMAND{$name}
1313 or return; 1319 or return;
1314 1320
1393 . "\n};\n1"; 1399 . "\n};\n1";
1394 1400
1395 $todo{$base} = \%ext; 1401 $todo{$base} = \%ext;
1396 } 1402 }
1397 1403
1404 my $pass = 0;
1398 my %done; 1405 my %done;
1399 while (%todo) { 1406 while (%todo) {
1400 my $progress; 1407 my $progress;
1401 1408
1409 ++$pass;
1410
1411 ext:
1402 while (my ($k, $v) = each %todo) { 1412 while (my ($k, $v) = each %todo) {
1403 for (split /,\s*/, $v->{meta}{depends}) { 1413 for (split /,\s*/, $v->{meta}{depends}) {
1404 goto skip 1414 next ext
1405 unless exists $done{$_}; 1415 unless exists $done{$_};
1406 } 1416 }
1407 1417
1408 warn "... loading '$k' into '$v->{pkg}'\n"; 1418 warn "... pass $pass, loading '$k' into '$v->{pkg}'\n";
1409 1419
1410 unless (eval $v->{source}) { 1420 my $active = eval $v->{source};
1421
1422 if (length $@) {
1411 my $msg = $@ ? "$v->{path}: $@\n" 1423 warn "$v->{path}: $@\n";
1412 : "$v->{base}: extension inactive.\n";
1413 1424
1414 if (exists $v->{meta}{mandatory}) {
1415 warn $msg;
1416 cf::cleanup "mandatory extension failed to load, exiting."; 1425 cf::cleanup "mandatory extension '$k' failed to load, exiting."
1417 } 1426 if exists $v->{meta}{mandatory};
1418 1427 } else {
1419 warn $msg; 1428 $done{$k} = delete $todo{$k};
1429 push @EXTS, $v->{pkg};
1430 $progress = 1;
1431
1432 warn "$v->{base}: extension inactive.\n"
1433 unless $active;
1420 } 1434 }
1421
1422 $done{$k} = delete $todo{$k};
1423 push @EXTS, $v->{pkg};
1424 $progress = 1;
1425 } 1435 }
1426 1436
1427 skip: 1437 unless ($progress) {
1428 die "cannot load " . (join ", ", keys %todo) . ": unable to resolve dependencies\n" 1438 warn "cannot load " . (join ", ", keys %todo) . ": unable to resolve dependencies\n";
1429 unless $progress; 1439
1440 while (my ($k, $v) = each %todo) {
1441 cf::cleanup "mandatory extension '$k' has unresolved dependencies, exiting."
1442 if exists $v->{meta}{mandatory};
1443 }
1444 }
1430 } 1445 }
1431 }; 1446 };
1432} 1447}
1433 1448
1434############################################################################# 1449#############################################################################
1518 $cf::PLAYER{$login} = $pl 1533 $cf::PLAYER{$login} = $pl
1519 } 1534 }
1520 } 1535 }
1521} 1536}
1522 1537
1538cf::player->attach (
1539 on_load => sub {
1540 my ($pl, $path) = @_;
1541
1542 # restore slots saved in save, below
1543 my $slots = delete $pl->{_slots};
1544
1545 $pl->ob->current_weapon ($slots->[0]);
1546 $pl->combat_ob ($slots->[1]);
1547 $pl->ranged_ob ($slots->[2]);
1548 },
1549);
1550
1523sub save($) { 1551sub save($) {
1524 my ($pl) = @_; 1552 my ($pl) = @_;
1525 1553
1526 return if $pl->{deny_save}; 1554 return if $pl->{deny_save};
1527 1555
1532 1560
1533 aio_mkdir playerdir $pl, 0770; 1561 aio_mkdir playerdir $pl, 0770;
1534 $pl->{last_save} = $cf::RUNTIME; 1562 $pl->{last_save} = $cf::RUNTIME;
1535 1563
1536 cf::get_slot 0.01; 1564 cf::get_slot 0.01;
1565
1566 # save slots, to be restored later
1567 local $pl->{_slots} = [$pl->ob->current_weapon, $pl->combat_ob, $pl->ranged_ob];
1537 1568
1538 $pl->save_pl ($path); 1569 $pl->save_pl ($path);
1539 cf::cede_to_tick; 1570 cf::cede_to_tick;
1540} 1571}
1541 1572
1754 my $lock = cf::lock_acquire "generate_random_map"; # the random map generator is NOT reentrant ATM 1785 my $lock = cf::lock_acquire "generate_random_map"; # the random map generator is NOT reentrant ATM
1755 1786
1756 # mit "rum" bekleckern, nicht 1787 # mit "rum" bekleckern, nicht
1757 $self->_create_random_map ( 1788 $self->_create_random_map (
1758 $rmp->{wallstyle}, $rmp->{wall_name}, $rmp->{floorstyle}, $rmp->{monsterstyle}, 1789 $rmp->{wallstyle}, $rmp->{wall_name}, $rmp->{floorstyle}, $rmp->{monsterstyle},
1759 $rmp->{treasurestyle}, $rmp->{layoutstyle}, $rmp->{doorstyle}, $rmp->{decorstyle}, 1790 $rmp->{treasurestyle}, $rmp->{layoutstyle}, $rmp->{doorstyle}, $rmp->{decorstyle}, $rmp->{miningstyle},
1760 $rmp->{origin_map}, $rmp->{final_map}, $rmp->{exitstyle}, $rmp->{this_map}, 1791 $rmp->{origin_map}, $rmp->{final_map}, $rmp->{exitstyle}, $rmp->{this_map},
1761 $rmp->{exit_on_final_map}, 1792 $rmp->{exit_on_final_map},
1762 $rmp->{xsize}, $rmp->{ysize}, 1793 $rmp->{xsize}, $rmp->{ysize},
1763 $rmp->{expand2x}, $rmp->{layoutoptions1}, $rmp->{layoutoptions2}, $rmp->{layoutoptions3}, 1794 $rmp->{expand2x}, $rmp->{layoutoptions1}, $rmp->{layoutoptions2}, $rmp->{layoutoptions3},
1764 $rmp->{symmetry}, $rmp->{difficulty}, $rmp->{difficulty_given}, $rmp->{difficulty_increase}, 1795 $rmp->{symmetry}, $rmp->{difficulty}, $rmp->{difficulty_given}, $rmp->{difficulty_increase},
2010 2041
2011 $cf::MAP{$path} = $map 2042 $cf::MAP{$path} = $map
2012 } 2043 }
2013} 2044}
2014 2045
2015sub pre_load { } 2046sub pre_load { }
2016sub post_load { } 2047#sub post_load { } # XS
2017 2048
2018sub load { 2049sub load {
2019 my ($self) = @_; 2050 my ($self) = @_;
2020 2051
2021 local $self->{deny_reset} = 1; # loading can take a long time 2052 local $self->{deny_reset} = 1; # loading can take a long time
2078 } 2109 }
2079 2110
2080 $self->post_load; 2111 $self->post_load;
2081} 2112}
2082 2113
2114# customize the map for a given player, i.e.
2115# return the _real_ map. used by e.g. per-player
2116# maps to change the path to ~playername/mappath
2083sub customise_for { 2117sub customise_for {
2084 my ($self, $ob) = @_; 2118 my ($self, $ob) = @_;
2085 2119
2086 return find "~" . $ob->name . "/" . $self->{path} 2120 return find "~" . $ob->name . "/" . $self->{path}
2087 if $self->per_player; 2121 if $self->per_player;
3116 3150
3117 $coro 3151 $coro
3118} 3152}
3119 3153
3120cf::client->attach ( 3154cf::client->attach (
3121 on_destroy => sub { 3155 on_client_destroy => sub {
3122 my ($ns) = @_; 3156 my ($ns) = @_;
3123 3157
3124 $_->cancel for values %{ (delete $ns->{_coro}) || {} }; 3158 $_->cancel for values %{ (delete $ns->{_coro}) || {} };
3125 }, 3159 },
3126); 3160);
3142our $safe_hole = new Safe::Hole; 3176our $safe_hole = new Safe::Hole;
3143 3177
3144$SIG{FPE} = 'IGNORE'; 3178$SIG{FPE} = 'IGNORE';
3145 3179
3146$safe->permit_only (Opcode::opset qw( 3180$safe->permit_only (Opcode::opset qw(
3147 :base_core :base_mem :base_orig :base_math 3181 :base_core :base_mem :base_orig :base_math :base_loop
3148 grepstart grepwhile mapstart mapwhile 3182 grepstart grepwhile mapstart mapwhile
3149 sort time 3183 sort time
3150)); 3184));
3151 3185
3152# here we export the classes and methods available to script code 3186# here we export the classes and methods available to script code
3204 $qcode =~ s/"/‟/g; # not allowed in #line filenames 3238 $qcode =~ s/"/‟/g; # not allowed in #line filenames
3205 $qcode =~ s/\n/\\n/g; 3239 $qcode =~ s/\n/\\n/g;
3206 3240
3207 %vars = (_dummy => 0) unless %vars; 3241 %vars = (_dummy => 0) unless %vars;
3208 3242
3243 my @res;
3209 local $_; 3244 local $_;
3210 local @safe::cf::_safe_eval_args = values %vars;
3211 3245
3212 my $eval = 3246 my $eval =
3213 "do {\n" 3247 "do {\n"
3214 . "my (" . (join ",", map "\$$_", keys %vars) . ") = \@cf::_safe_eval_args;\n" 3248 . "my (" . (join ",", map "\$$_", keys %vars) . ") = \@cf::_safe_eval_args;\n"
3215 . "#line 0 \"{$qcode}\"\n" 3249 . "#line 0 \"{$qcode}\"\n"
3216 . $code 3250 . $code
3217 . "\n}" 3251 . "\n}"
3218 ; 3252 ;
3219 3253
3254 if ($CFG{safe_eval}) {
3220 sub_generation_inc; 3255 sub_generation_inc;
3256 local @safe::cf::_safe_eval_args = values %vars;
3221 my @res = wantarray ? $safe->reval ($eval) : scalar $safe->reval ($eval); 3257 @res = wantarray ? $safe->reval ($eval) : scalar $safe->reval ($eval);
3222 sub_generation_inc; 3258 sub_generation_inc;
3259 } else {
3260 local @cf::_safe_eval_args = values %vars;
3261 @res = wantarray ? eval eval : scalar eval $eval;
3262 }
3223 3263
3224 if ($@) { 3264 if ($@) {
3225 warn "$@"; 3265 warn "$@";
3226 warn "while executing safe code '$code'\n"; 3266 warn "while executing safe code '$code'\n";
3227 warn "with arguments " . (join " ", %vars) . "\n"; 3267 warn "with arguments " . (join " ", %vars) . "\n";
3246=cut 3286=cut
3247 3287
3248sub register_script_function { 3288sub register_script_function {
3249 my ($fun, $cb) = @_; 3289 my ($fun, $cb) = @_;
3250 3290
3251 no strict 'refs'; 3291 $fun = "safe::$fun" if $CFG{safe_eval};
3252 *{"safe::$fun"} = $safe_hole->wrap ($cb); 3292 *$fun = $safe_hole->wrap ($cb);
3253} 3293}
3254 3294
3255=back 3295=back
3256 3296
3257=cut 3297=cut
3278 3318
3279 $facedata->{version} == 2 3319 $facedata->{version} == 2
3280 or cf::cleanup "$path: version mismatch, cannot proceed."; 3320 or cf::cleanup "$path: version mismatch, cannot proceed.";
3281 3321
3282 # patch in the exptable 3322 # patch in the exptable
3323 my $exp_table = $enc->encode ([map cf::level_to_min_exp $_, 1 .. cf::settings->max_level]);
3283 $facedata->{resource}{"res/exp_table"} = { 3324 $facedata->{resource}{"res/exp_table"} = {
3284 type => FT_RSRC, 3325 type => FT_RSRC,
3285 data => $enc->encode ([map cf::level_to_min_exp $_, 1 .. cf::settings->max_level]), 3326 data => $exp_table,
3327 hash => (Digest::MD5::md5 $exp_table),
3286 }; 3328 };
3287 cf::cede_to_tick; 3329 cf::cede_to_tick;
3288 3330
3289 { 3331 {
3290 my $faces = $facedata->{faceinfo}; 3332 my $faces = $facedata->{faceinfo};
3292 while (my ($face, $info) = each %$faces) { 3334 while (my ($face, $info) = each %$faces) {
3293 my $idx = (cf::face::find $face) || cf::face::alloc $face; 3335 my $idx = (cf::face::find $face) || cf::face::alloc $face;
3294 3336
3295 cf::face::set_visibility $idx, $info->{visibility}; 3337 cf::face::set_visibility $idx, $info->{visibility};
3296 cf::face::set_magicmap $idx, $info->{magicmap}; 3338 cf::face::set_magicmap $idx, $info->{magicmap};
3297 cf::face::set_data $idx, 0, $info->{data32}, Digest::MD5::md5 $info->{data32}; 3339 cf::face::set_data $idx, 0, $info->{data32}, $info->{hash32};
3298 cf::face::set_data $idx, 1, $info->{data64}, Digest::MD5::md5 $info->{data64}; 3340 cf::face::set_data $idx, 1, $info->{data64}, $info->{hash64};
3299 3341
3300 cf::cede_to_tick; 3342 cf::cede_to_tick;
3301 } 3343 }
3302 3344
3303 while (my ($face, $info) = each %$faces) { 3345 while (my ($face, $info) = each %$faces) {
3327 3369
3328 cf::anim::invalidate_all; # d'oh 3370 cf::anim::invalidate_all; # d'oh
3329 } 3371 }
3330 3372
3331 { 3373 {
3332 # TODO: for gcfclient pleasure, we should give resources
3333 # that gcfclient doesn't grok a >10000 face index.
3334 my $res = $facedata->{resource}; 3374 my $res = $facedata->{resource};
3335 3375
3336 while (my ($name, $info) = each %$res) { 3376 while (my ($name, $info) = each %$res) {
3337 if (defined $info->{type}) { 3377 if (defined $info->{type}) {
3338 my $idx = (cf::face::find $name) || cf::face::alloc $name; 3378 my $idx = (cf::face::find $name) || cf::face::alloc $name;
3339 my $data;
3340 3379
3341 if ($info->{type} & 1) { 3380 cf::face::set_data $idx, 0, $info->{data}, $info->{hash};
3342 # prepend meta info
3343
3344 my $meta = $enc->encode ({
3345 name => $name,
3346 %{ $info->{meta} || {} },
3347 });
3348
3349 $data = pack "(w/a*)*", $meta, $info->{data};
3350 } else {
3351 $data = $info->{data};
3352 }
3353
3354 cf::face::set_data $idx, 0, $data, Digest::MD5::md5 $data;
3355 cf::face::set_type $idx, $info->{type}; 3381 cf::face::set_type $idx, $info->{type};
3356 } else { 3382 } else {
3357 $RESOURCE{$name} = $info; 3383 $RESOURCE{$name} = $info;
3358 } 3384 }
3359 3385
3531 reload_config; 3557 reload_config;
3532 db_init; 3558 db_init;
3533 3559
3534 cf::init_uuid; 3560 cf::init_uuid;
3535 cf::init_signals; 3561 cf::init_signals;
3536 cf::init_commands;
3537 cf::init_skills; 3562 cf::init_skills;
3538 3563
3539 cf::init_beforeplay; 3564 cf::init_beforeplay;
3540 3565
3541 atomic; 3566 atomic;
3566 }; 3591 };
3567 } 3592 }
3568} 3593}
3569 3594
3570sub write_runtime_sync { 3595sub write_runtime_sync {
3596 my $t0 = EV::time;
3597
3571 # first touch the runtime file to show we are still running: 3598 # first touch the runtime file to show we are still running:
3572 # the fsync below can take a very very long time. 3599 # the fsync below can take a very very long time.
3573 3600
3574 IO::AIO::aio_utime $RUNTIMEFILE, undef, undef; 3601 IO::AIO::aio_utime $RUNTIMEFILE, undef, undef;
3575 3602
3576 my $guard = cf::lock_acquire "write_runtime"; 3603 my $guard = cf::lock_acquire "write_runtime";
3577 3604
3578 my $fh = aio_open "$RUNTIMEFILE~", O_WRONLY | O_CREAT, 0644 3605 my $fh = aio_open "$RUNTIMEFILE~", O_WRONLY | O_CREAT | O_TRUNC, 0644
3579 or return; 3606 or return;
3580 3607
3581 my $value = $cf::RUNTIME + 90 + 10; 3608 my $value = $cf::RUNTIME + 90 + 10;
3582 # 10 is the runtime save interval, for a monotonic clock 3609 # 10 is the runtime save interval, for a monotonic clock
3583 # 60 allows for the watchdog to kill the server. 3610 # 60 allows for the watchdog to kill the server.
3596 or return; 3623 or return;
3597 3624
3598 aio_rename "$RUNTIMEFILE~", $RUNTIMEFILE 3625 aio_rename "$RUNTIMEFILE~", $RUNTIMEFILE
3599 and return; 3626 and return;
3600 3627
3601 warn "runtime file written.\n"; 3628 warn sprintf "runtime file written (%gs).\n", EV::time - $t0;
3602 3629
3603 1 3630 1
3604} 3631}
3605 3632
3606our $uuid_lock; 3633our $uuid_lock;
3897 3924
3898our @WAIT_FOR_TICK; 3925our @WAIT_FOR_TICK;
3899our @WAIT_FOR_TICK_BEGIN; 3926our @WAIT_FOR_TICK_BEGIN;
3900 3927
3901sub wait_for_tick { 3928sub wait_for_tick {
3902 return if tick_inhibit || $Coro::current == $Coro::main; 3929 return Coro::cede if tick_inhibit || $Coro::current == $Coro::main;
3903 3930
3904 my $signal = new Coro::Signal; 3931 my $signal = new Coro::Signal;
3905 push @WAIT_FOR_TICK, $signal; 3932 push @WAIT_FOR_TICK, $signal;
3906 $signal->wait; 3933 $signal->wait;
3907} 3934}
3908 3935
3909sub wait_for_tick_begin { 3936sub wait_for_tick_begin {
3910 return if tick_inhibit || $Coro::current == $Coro::main; 3937 return Coro::cede if tick_inhibit || $Coro::current == $Coro::main;
3911 3938
3912 my $signal = new Coro::Signal; 3939 my $signal = new Coro::Signal;
3913 push @WAIT_FOR_TICK_BEGIN, $signal; 3940 push @WAIT_FOR_TICK_BEGIN, $signal;
3914 $signal->wait; 3941 $signal->wait;
3915} 3942}
3920 unless ++$bug_warning > 10; 3947 unless ++$bug_warning > 10;
3921 return; 3948 return;
3922 } 3949 }
3923 3950
3924 cf::server_tick; # one server iteration 3951 cf::server_tick; # one server iteration
3952
3953 #for(1..3e6){} EV::now_update; $NOW=EV::now; # generate load #d#
3925 3954
3926 if ($NOW >= $NEXT_RUNTIME_WRITE) { 3955 if ($NOW >= $NEXT_RUNTIME_WRITE) {
3927 $NEXT_RUNTIME_WRITE = List::Util::max $NEXT_RUNTIME_WRITE + 10, $NOW + 5.; 3956 $NEXT_RUNTIME_WRITE = List::Util::max $NEXT_RUNTIME_WRITE + 10, $NOW + 5.;
3928 Coro::async_pool { 3957 Coro::async_pool {
3929 $Coro::current->{desc} = "runtime saver"; 3958 $Coro::current->{desc} = "runtime saver";
3952} 3981}
3953 3982
3954{ 3983{
3955 # configure BDB 3984 # configure BDB
3956 3985
3957 BDB::min_parallel 8; 3986 BDB::min_parallel 16;
3958 BDB::max_poll_reqs $TICK * 0.1; 3987 BDB::max_poll_reqs $TICK * 0.1;
3959 $AnyEvent::BDB::WATCHER->priority (1); 3988 $AnyEvent::BDB::WATCHER->priority (1);
3960 3989
3961 unless ($DB_ENV) { 3990 unless ($DB_ENV) {
3962 $DB_ENV = BDB::db_env_create; 3991 $DB_ENV = BDB::db_env_create;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines