Commit b6b39926 authored by Leigh B Stoller's avatar Leigh B Stoller

Add 'size' column to 'reserved_blockstores' table. We need this

to support swapmod, since otherwise we would not know what an
experiment currently has once the swapmod starts and the virt topo
cleared from the DB.
parent 2d874ba4
......@@ -3645,6 +3645,7 @@ CREATE TABLE `reserved_blockstores` (
`pid` varchar(48) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
`exptidx` int(11) NOT NULL default '0',
`size` int(10) unsigned NOT NULL default '0',
`rsrv_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`exptidx`,`bsidx`,`vname`),
UNIQUE KEY `vname` (`exptidx`,`vname`),
......
#
# Add 'size' column to 'reserved_blockstores' table. We need this
# to support swapmod, since otherwise we would not know what an
# experiment currently has once the swapmod starts and the virt topo
# cleared from the DB.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("reserved_blockstores", "size")) {
DBQueryFatal("alter table reserved_blockstores add ".
" `size` int(10) unsigned NOT NULL default '0' ".
" after exptidx");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment