mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
[master] add zone memory context pools
3492. [bug] Fixed a regression in zone loading performance due to lock contention. [RT #30399]
This commit is contained in:
@@ -568,7 +568,8 @@ journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
||||
if (j == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
j->mctx = mctx;
|
||||
j->mctx = NULL;
|
||||
isc_mem_attach(mctx, &j->mctx);
|
||||
j->state = JOURNAL_STATE_INVALID;
|
||||
j->fp = NULL;
|
||||
j->filename = filename;
|
||||
@@ -679,7 +680,7 @@ journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
||||
}
|
||||
if (j->fp != NULL)
|
||||
(void)isc_stdio_close(j->fp);
|
||||
isc_mem_put(j->mctx, j, sizeof(*j));
|
||||
isc_mem_putanddetach(&j->mctx, j, sizeof(*j));
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -1244,7 +1245,7 @@ dns_journal_destroy(dns_journal_t **journalp) {
|
||||
if (j->fp != NULL)
|
||||
(void)isc_stdio_close(j->fp);
|
||||
j->magic = 0;
|
||||
isc_mem_put(j->mctx, j, sizeof(*j));
|
||||
isc_mem_putanddetach(&j->mctx, j, sizeof(*j));
|
||||
*journalp = NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user