GitHub user armenatzoglou opened a pull request:
https://github.com/apache/incubator-hawq/pull/32
HAWQ-46. Change data type for Metadata Versioning versions from int64 to
uint64
Currently, metadata versioning versions are uint64. However, during version
generation, we use an atomic operation that returns int64 and then cast it to
unsigned:
uint64
mdver_next_global_version()
{
return (uint64) gp_atomic_add_64(mdver_global_version_counter, 1);
}
But, this may cause an integer overflow.
Now we have the atomic operations gp_atomic_add_int64 (former
gp_atomic_add_64) and gp_atomic_add_uint64, for additions of int64 and unsigned
int64 values, respectively.
All places that handle versions use the gp_atomic_add_uint64 function.
Moreover, I have created unit tests, which run on both OS X and Linux.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gcaragea/incubator-hawq nikos-HAWQ-46
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-hawq/pull/32.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #32
----
commit 3a258671a991760d2b20d98dc2d1e548686d0e40
Author: Nikos Armenatzoglou <[email protected]>
Date: 2015-10-21T22:56:44Z
HAWQ-46. Change data type for Metadata Versioning versions from int64 to
uint64.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---