Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
93998532
Commit
93998532
authored
Jan 06, 2006
by
Kurt Zeilenga
Browse files
ITS#4308 slapd-bdb/hdb cache sched fix
parent
ccd520c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
93998532
...
...
@@ -5,6 +5,7 @@ OpenLDAP 2.3.16 Engineering
Fixed slapd-monitor connection search crash (ITS#4300)
Flapd slapd cn=config bad ACL syntax modfy crash (ITS#4306)
Fixed slapd ACL/suffix configuration issue (ITS#4307)
Fixed slapd-bdb/hdb cache issue (ITS#4308)
Build environment
Replace sched_yield(2) on Linux with select(2) (ITS#3950)
Documentation
...
...
servers/slapd/back-bdb/back-bdb.h
View file @
93998532
...
...
@@ -150,6 +150,9 @@ struct bdb_db_info {
DB
*
bdi_db
;
};
/* From ldap_rq.h */
struct
re_s
;
struct
bdb_info
{
DB_ENV
*
bi_dbenv
;
...
...
@@ -175,9 +178,9 @@ struct bdb_info {
int
bi_txn_cp
;
u_int32_t
bi_txn_cp_min
;
u_int32_t
bi_txn_cp_kbyte
;
void
*
bi_txn_cp_task
;
void
*
bi_index_task
;
void
*
bi_cache_task
;
struct
re_s
*
bi_txn_cp_task
;
struct
re_s
*
bi_index_task
;
struct
re_s
*
bi_cache_task
;
int
bi_lock_detect
;
long
bi_shm_key
;
...
...
servers/slapd/back-bdb/cache.c
View file @
93998532
...
...
@@ -643,11 +643,16 @@ bdb_cache_lru_add(
ldap_pvt_thread_mutex_lock
(
&
slapd_rq
.
rq_mutex
);
if
(
bdb
->
bi_cache_task
)
{
if
(
!
ldap_pvt_runqueue_isrunning
(
&
slapd_rq
,
bdb
->
bi_cache_task
))
bdb
->
bi_cache_task
))
{
/* We want it to start right now */
bdb
->
bi_cache_task
->
interval
.
tv_sec
=
0
;
ldap_pvt_runqueue_resched
(
&
slapd_rq
,
bdb
->
bi_cache_task
,
0
);
/* But don't try to reschedule it while it's running */
bdb
->
bi_cache_task
->
interval
.
tv_sec
=
3600
;
}
}
else
{
bdb
->
bi_cache_task
=
ldap_pvt_runqueue_insert
(
&
slapd_rq
,
0
,
bdb
->
bi_cache_task
=
ldap_pvt_runqueue_insert
(
&
slapd_rq
,
360
0
,
bdb_cache_lru_purge
,
bdb
,
"bdb_cache_lru_purge"
,
bdb
->
bi_dbenv_home
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment