Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
3eba4836
Commit
3eba4836
authored
19 years ago
by
Eelco Dolstra
Browse files
Options
Downloads
Patches
Plain Diff
* Use Berkeley DB 4.4.20.
parent
151f10db
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
externals/Makefile.am
+3
-4
3 additions, 4 deletions
externals/Makefile.am
externals/register.patch
+0
-84
0 additions, 84 deletions
externals/register.patch
with
3 additions
and
88 deletions
externals/Makefile.am
+
3
−
4
View file @
3eba4836
# Berkeley DB
DB
=
db-4.4.
16
.NC
DB
=
db-4.4.
20
.NC
$(DB).tar.gz
:
@
echo
"Nix requires Berkeley DB to build."
@
echo
"Please download version 4.4.
16
from"
@
echo
" http://downloads.sleepycat.com/db-4.4.
16
.NC.tar.gz"
@
echo
"Please download version 4.4.
20
from"
@
echo
" http://downloads.sleepycat.com/db-4.4.
20
.NC.tar.gz"
@
echo
"and place it in the externals/ directory."
false
$(DB)
:
$(DB).tar.gz
gunzip
<
$(
DB
)
.tar.gz |
tar
xvf -
cd
$(
DB
)
&&
patch
-p1
< ../register.patch
have-db
:
$(
MAKE
)
$(
DB
)
...
...
This diff is collapsed.
Click to expand it.
externals/register.patch
deleted
100644 → 0
+
0
−
84
View file @
151f10db
diff -rc db-4.4.16.NC-orig/env/env_register.c db-4.4.16.NC/env/env_register.c
*** db-4.4.16.NC-orig/env/env_register.c 2005-10-07 22:21:27.000000000 +0200
--- db-4.4.16.NC/env/env_register.c 2005-12-08 17:16:44.000000000 +0100
***************
*** 217,226 ****
if (nr != PID_LEN)
goto corrupt;
! if (FLD_ISSET(
! dbenv->verbose, DB_VERB_REGISTER) && PID_ISEMPTY(buf)) {
__db_msg(dbenv, "%02u: EMPTY", lcnt);
! continue;
}
/*
--- 217,226 ----
if (nr != PID_LEN)
goto corrupt;
! if (PID_ISEMPTY(buf)) {
! if (FLD_ISSET(dbenv->verbose, DB_VERB_REGISTER))
__db_msg(dbenv, "%02u: EMPTY", lcnt);
! continue;
}
/*
diff -rc db-4.4.16.NC-orig/test/env012.tcl db-4.4.16.NC/test/env012.tcl
*** db-4.4.16.NC-orig/test/env012.tcl 2005-11-02 21:27:45.000000000 +0100
--- db-4.4.16.NC/test/env012.tcl 2005-12-08 17:21:19.000000000 +0100
***************
*** 168,173 ****
--- 168,219 ----
logcheckfails $testdir/env$tnum.log.p2 DB_RUNRECOVERY
logcheck $testdir/env$tnum.log.p3
+ # Regression test: check that recovery doesn't run if there is
+ # a "X " slot in the registry.
+ puts "\tEnv$tnum.f: Multiple processes can join with -register -recover."
+
+ # Make sure that we have at least 2 "X " slots in the registry.
+ puts "\t\tEnv$tnum.f1: Start process 1."
+ set p1 [exec $tclsh_path $test_path/wrap.tcl envscript.tcl \
+ $testdir/env$tnum.log.p1 \
+ $testdir $testfile PUT $key $data RECOVER 1 &]
+
+ puts "\t\tEnv$tnum.f2: Start process 2."
+ set p2 [exec $tclsh_path $test_path/wrap.tcl envscript.tcl \
+ $testdir/env$tnum.log.p2 \
+ $testdir $testfile PUT $key $data RECOVER 1 &]
+
+ watch_procs $p1 1 120
+ watch_procs $p2 1 120
+
+ logcheck $testdir/env$tnum.log.p1
+ logcheck $testdir/env$tnum.log.p2
+
+ # Start a process. It should not run recovery. Under the bug
+ # we're testing for, it would, because it would get an
+ # exclusive lock on the first "X " slot.
+ puts "\t\tEnv$tnum.f3: Start process 3."
+ set p3 [exec $tclsh_path $test_path/wrap.tcl envscript.tcl \
+ $testdir/env$tnum.log.p3 \
+ $testdir $testfile PUT $key $data RECOVER 10 &]
+
+ tclsleep 2
+
+ # Start another process. It should not run recovery either.
+ # The bug would cause it to run recovery because it would get
+ # an exclusive lock on the second "X " slot. This would
+ # cause p3 to panic.
+ puts "\t\tEnv$tnum.f4: Start process 4."
+ set p4 [exec $tclsh_path $test_path/wrap.tcl envscript.tcl \
+ $testdir/env$tnum.log.p4 \
+ $testdir $testfile PUT $key $data RECOVER 10 &]
+
+ watch_procs $p3 1 120
+ watch_procs $p4 1 120
+
+ # Check log files for failures.
+ logcheck $testdir/env$tnum.log.p3
+ logcheck $testdir/env$tnum.log.p4
}
# Check log file and report failures with FAIL. Use this when
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment