Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
6e7fe235
Commit
6e7fe235
authored
Mar 11, 2015
by
Marcin Siodelski
Browse files
[3673] One more update to the comment in the time conversion for PgSQL.
parent
efe72946
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/pgsql_lease_mgr.cc
View file @
6e7fe235
...
...
@@ -315,10 +315,11 @@ public:
int64_t
expire_time_64
=
static_cast
<
int64_t
>
(
cltt
)
+
static_cast
<
int64_t
>
(
valid_lifetime
);
// On 32-bit systems the time_t is implemented as the int32_t value.
// We want to detect overflows beyond maximum int32_t value here
// to avoid the overflow in the PostgreSQL database. The PostgreSQL
// doesn't catch those overflows on its own.
// It has been observed that the PostgreSQL doesn't deal well with the
// timestamp values beyond the LeaseMgr::MAX_DB_TIME seconds since the
// beginning of the epoch (around year 2038). The value is often
// stored in the database but it is invalid when read back (overflow?).
// Hence, the maximum timestamp value is restricted here.
if
(
expire_time_64
>
LeaseMgr
::
MAX_DB_TIME
)
{
isc_throw
(
isc
::
BadValue
,
"Time value is too large: "
<<
expire_time_64
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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