Release Notes

Documentation

VoltDB Home » Documentation » Release Notes

Release Notes


Product

VoltDB

Version

4.0.1.11

Release Date

February, 2015

This document provides information about known issues and limitations to the current release of VoltDB. If you encounter any problems not listed below, please be sure to report them to [email protected]. Thank you.

What's New for VoltDB 4.0

VoltDB 4.0 is a major release. It consolidates and completes many features introduced over the past few months, including elasticity and changes to the user interface to improve overall ease of use of the product. Note that some changes to product syntax and functions will affect existing applications. Users of previous versions need to pay special attention to the section on Special Considerations for Existing Customers.

Benefits of VoltDB 4.0 include:

  • Elasticity — the ability to add nodes to the database cluster "on the fly" — with support for all standard features including K-safety, command logging, and export.

  • New SQL support including:

    • Improved use of indexes

    • Performance improvements for views

    • More robust support for expressions in indexes, functions, and clauses

    • Support for inner, outer, and self joins

  • Improved server-based export

  • A new, more consistent command line interface (CLI) for starting the database cluster

Special Considerations for Existing Customers

To accommodate new features and focus on improved ease of use, a number of changes have been made to the VoltDB product, including changes to functionality from earlier versions. Existing customers should be aware of the following changes in behavior that could impact their applications.

1.1.

Try the VoltDB Enterprise Edition.

With V4.0, the durability and availability features associated with production usage move from the VoltDB community edition to the enterprise edition. This includes K-safety and snapshot save and restore. We encourage anyone who has been using the community edition to try the enterprise edition, which comes with a 30 day trial license. The community edition is still freely available for research and application development. However, the Enterprise Edition is recommended for all production environments.

1.2.

Recompile your application catalogs when upgrading.

To avoid possible mismatches between catalogs and server software, VoltDB now requires that you recompile your application catalog whenever you upgrade. This change was introduced in VoltDB 3.7.

1.3.

Upgrade both server and Java client systems.

The Java client library implements client affinity, allowing the client to route procedure calls to the most effective database server. VoltDB 4.0 changes the hashing algorithms for partitioning. As result, attempting to call a VoltDB v4.0 database using a VoltDB 3.x Java client library can result in spurious errors and decreased performance. We strongly recommend upgrading both server and client systems when upgrading to VoltDB V4.0. (This change does not affect non-Java clients.)

1.4.

Check the latest system requirements

With 4.0. VoltDB has updated system requirements. CentOS 5.8 and OS X 10.6 are no longer supported. Also, VoltDB now requires Java 7. If you have not already, be sure to upgrade your server software to meet the new requirements:

  • CentOS 6.3 and later, Red Hat 6.3 and later, Ubuntu 10.4 and 12.4, or Macintosh OS X 10.7 and later

  • OpenJDK or Oracle/Sun JDK 7 or later

1.5.

Update scripts that use the CLI to start VoltDB.

VoltDB 4.0 introduces a new command line interface (CLI) for starting server nodes. The commands for voltdb create, recover, rejoin, and add now use standard LINUX command line syntax, including argument switches, consistent with the other VoltDB command line utilities voltadmin, csvloader, and sqlcmd. As a result, you will need to update any scripts you have for starting VoltDB servers from the command line. (Note that the REST interface has not changed.) For example, the command to start a new database cluster looks like this:

$ voltdb create mycatalog.jar \
     --deployment=deployment.xml \
     --host=voltsvr1 \
     --license=~/license.xml

There are also short forms for the most common switches:

$ voltdb create mycatalog.jar \
     -d deployment.xml \
     -H voltsvr1 \
     -l ~/license.xml

If you would prefer to temporarily continue using the old syntax for the voltdb command, you can either:

  • Use the voltdb3 command which is provided for backwards compatibility.

  • Replace the voltdb script in the VoltDB /bin directory with the voltdb3 script. To do this, we recommend copying /bin/voltdb to /bin/voltdb4 and then copying /bin/voltdb3 to /bin/voltdb, so you have access to both the old and new syntax.

1.6.

Changes related to elasticity.

With 4.0, elasticity (the ability to expand a running database) is enabled by default. There are several consequences of this change:

  • You no longer need to explicitly enable elasticity by including the elastic="enabled" attribute to the <cluster> element in the deployment file. If you want to revert to older, non-elastic behavior, use the attribute elastic="disabled".

  • Elasticity changes how content is segmented into partitions. As a result the trick for reaching each partition separately by incrementing a partition key modulo the number of partitions will not work reliably. Instead, a new system procedure is provided that returns a set of key values for reaching all of the current partitions. The syntax for the @GetPartitionKeys system procedure is:

    ClientResponse client.callProcedure("@GetPartitionKeys", String datatype)

    The parameter to the procedure is a string value specifying the datatype of the keys to return. The allowable values for the parameter (which is not case sensitive) are "INTEGER", "STRING", and "VARCHAR", where "STRING" and "VARCHAR" are synonyms.

    Note that the results of the @GetPartitionKeys system procedure are valid at the time they are generated. If the cluster is static (that is, no nodes are being added and any rebalancing is complete), the results remain valid until the next elastic event. However, during rebalancing, the distribution of partitions is likely to change. So it is a good idea to call @GetPartitionKeys once to get the keys, act on them, then call the system procedure again to verify that the partitions have not changed.

  • When adding nodes to a highly available cluster (that is, where the K-safety value is greater than zero), you must add K+1 nodes before the cluster starts to rebalance the partitions. Until you add a full complement of K+1 nodes, any added nodes join the cluster but do not participate in any work until the rebalancing starts.

  • While rebalancing is in progress, the cluster continues to process client requests. However, rebalancing will tend to impact latency of other transactions. Also, depending on the workload and size of the database, rebalancing can take a significant amount of time. You can configure the ratio of ongoing client transactions against rebalancing activities. See the section on elastic scaling in the Using VoltDB manual for details.

  • Elasticity works with all major features of VoltDB, including export, K-safety, command logging, and database replication (DR). For DR, when you use elasticity to expand the master cluster, replication stops. Once the master cluster finishes rebalancing, you can restart the replica — using sufficient nodes to match the new master configuration — then restart the DR agent. You cannot elastically expand the replica cluster.

1.7.

Update the deployment file for any database using export.

With 4.0, support for remote clients has been dropped. All export clients must run on the database server. This change provides both more reliability and better performance for the export process.

As part of this change, the configuration of export in the deployment file has changed to simplify configuration. Specifically, the <onserver> element has been removed and the exportto attribute is replaced by the target attribute to the parent <export> element. The following example illustrates the new syntax you must use:

<export enabled="true" target="file">
   <configuration>
     <property name="type">csv</property>
     <property name="nonce">MyExport</property>
  </configuration>
</export>

1.8.

Evaluate your schema for possible use of ASSUMEUNIQUE.

In previous releases, VoltDB allowed you to define unique indexes on partitioned tables, although the index could not be guaranteed to be unique. If an index on a partitioned table does not include the partitioning column, there is no way for VoltDB to ensure the index is unique except within the partition where the query is executed.

To ensure global uniqueness for UNIQUE and PRIMARY KEY indexes, VoltDB no longer allows you to define such indexes on partitioned tables if the index does not include the partitioning column. As a result, schema that compiled successfully in the past may fail to compile under VoltDB 4.0.

However, there is an alternative. A new keyword, ASSUMEUNIQUE, has been added. You can use ASSUMEUNIQUE anywhere you use UNIQUE. The difference is that an ASSUMEUNIQUE index can be defined on a partitioned table where the index does not contain the partitioning column. VoltDB treats ASSUMEUNIQUE indexes as if they were unique, providing all the performance advantages of unique indexes. However, it is your responsibility to ensure the index is actually globally unique.

Although VoltDB verifies the index entry is unique within the current partition when a record is inserted, the danger is that if the index is not actually unique, any operation that repartitions the data could generate a constraint violation when two matching ASSUMEUNIQUE entries fall within the same partition. Operations that could generate such violations include restoring a snapshot to a different cluster configuration or rebalancing as a result of adding nodes. When this happens the repartitioning operation is likely to fail and you must correct the conflict before continuing.

Therefore, although there are performance advantages to using ASSUMEUNIQUE indexes, you use them at your own risk. You should ensure that the indexes are actually globally unique, either by design or by external verification, before inserting ASSUMEUNIQUE records into the database itself.

Important Base Platform Considerations

The recommended platform for production use of VoltDB is CentOS 6.3 or later, Ubuntu 10.4 or 12.4, and OpenJDK or Sun JDK 7 or later. Macintosh OS X 10.7 and later is supported as a development platform. However, there are certain configuration options in the base platforms that are important when running VoltDB.

1.1.

Disable Swapping

Swapping is an operating system feature that optimizes memory usage when running multiple processes. However, memory is a critical component of the VoltDB server process. Any contention for memory, including swapping, will have a very negative impact on performance and functionality.

We recommend using dedicated servers and disabling swapping when running the VoltDB database server process. Use the swapoff command to disable swapping on Linux systems. If swapping cannot be disabled for any reason, you can reduce the likelihood of VoltDB being swapped out by setting the kernel parameter vm.swappiness to zero.

1.2.

Turn off TCP segmentation offload and generic receive offload if cluster stability is a problem.

There is an issue where, under certain conditions, the use of TCP segmentation offload (TSO) and generic receive offload (GRO) can cause nodes to randomly drop out of a cluster. The symptoms of this problem are that nodes timeout — that is, the rest of the cluster thinks they have failed — although the node is still running and no other network issues (such as a network partition) are the cause.

Disabling TSO and GRO is recommended for any VoltDB clusters that experience such instability. The commands to disable offloading are the following, where N is replaced by the number of the ethernet card:

ethtool -K ethN tso off
ethtool -K ethN gro off

Note that these commands disable offloading temporarily. You must issue these commands every time the node reboots.

Upgrading From Older Versions

When upgrading from a previous version of VoltDB — especially with an existing database — there are a number of important notes that you should be aware of. Some changes to the structure and syntax of the VoltDB schema and deployment files may make old application catalogs and configuration files incompatible with newer versions.

Although incompatible changes are avoided wherever possible, some changes are necessary to add new features. It is always recommended that applications catalogs be recompiled when upgrading the VoltDB version. It is also important to note that the catalog is saved as part of snapshots and command logging. As a consequence, you must be careful to ensure an incompatible catalog is not loaded accidentally by starting a database with the recover action after an upgrade.

The process for upgrading VoltDB for a running database is as follows:

  1. Place the database in admin mode (using voltadmin pause or the VoltDB Enterprise Manager).

  2. Perform a manual snapshot of the database (using voltadmin save).

  3. Shutdown the database (using voltadmin shutdown).

  4. Upgrade VoltDB.

  5. Recompile the application catalog using the new version of VoltDB.

  6. Restart the database using the create option, the new catalog, and starting in admin mode (specified in the deployment file).

  7. Restore the snapshot created in Step #2 (using voltadmin restore).

  8. Return the database to normal operations (using voltadmin resume).

When using the Enterprise Manager, it is also recommended that you delete the Enterprise Manager configuration files (stored by default in the .voltdb subfolder in the home directory of the current account) when performing an upgrade.

Changes Since the Last Release

Users of previous versions of VoltDB should take note of the following changes that might impact their existing applications.

1. Release V4.0.1.11

1.1.

Bug Fixes

  • Fixed an issue where a command log recovery deadlocked on a command log that contained a catalog update followed by an ad hoc multi-partition write. Also fixed in V4.6.3.

2. Release V4.0.1.10

2.1.

Bug Fixes

  • Fixed an issue where a rejoin seemingly completes, however does not clear its rejoining state. The rejoin eventually times out, and the node that rejoins crashes.

3. Release V4.0.1.9

3.1.

Bug Fixes

  • Fixed an issue where wrong answers were returned when GROUP BY columns and expressions were not selected as the first returned column. Also fixed in V4.6.2.

4. Release V4.0.1.8

4.1.

Bug Fixes

  • Fixed an issue where temp tables were retained between runs of a query, resulting in accumulation of memory that could exhaust system memory.

  • Fixed an issue where if a JDBC client lost all of its connections to the database and could not successfully reconnect, the process would create an additional network thread with each attempted reconnect but failed to recover those threads, eventually running out of threads for the process. Also fixed in V4.6.1.

  • Fixed an issue where JDBC isValid() returned the wrong boolean value when checking a connection. Also fixed in V4.6.1.

5. Release V4.0.1.7

5.1.

Bug Fixes

  • Fixed an issue where a safe mode recovery could fail if the unsafe transaction was a multi-partition procedure.

  • Fixed an issue where an online catalog update, using @UpdateApplicationCatalog, that dropped multiple indices would not remove all the indices.

6. Release V4.0.1.6

6.1.

Bug Fixes

  • Fixed an issue where the JDBC client did not clean up client instances when a connection was lost.

  • Fixed an issue where a JDBC connection would fail if the connection string included an inaccessible server.

7. Release V4.0.1.5

7.1.

Bug Fixes

  • Fixed an issue where JDBC getTimestamp threw a SQL error with NULL timestamp and dropped milliseconds when returned by ResultSet.getTimestamp().

8. Release V4.0.1.4

8.1.

Bug Fixes

  • JDBC ResultSet.getMetaData() now supports VARBINARY.

  • Fixed an issue to correctly count DML updates. Batches of DML now set the updated count properly. Previously in a batch of updates, the updated count was set to that of the last statement in the batch.

  • JDBC functions setInt(), setDouble() and setFloat() will now convert to string when used on VARCHAR columns.

9. Release V4.0.1.3

9.1.

Bug Fixes

  • Added support for JDBC setFloat(). The data is converted to double in the database.

10. Release V4.0.1.2

10.1.

Bug Fixes

  • Add support for VoltDB client to run on Java 6.

11. Release V4.0.1

11.1.

Further testing and hardening of the new elastic functionality

A number of issues have been discovered and resolved in the elastic cluster functionality that is introduced in version 4.0. In particular, edge cases related to error conditions when nodes fail during elastic scaling have been identified and corrected.

11.2.

Java client improvements

This release includes several improvements to the Java client, including:

  • The client is shipped as a single JAR file with no external dependencies

  • The client JAR is backwards compatible with Java 6 (although the VoltDB server now requires Java 7)

  • All status information concerning failed procedure calls is now consolidated in the two ClientResponse methods getStatus() and getStatusString()

As a consequence of this last change, the method ClientResponse.getException() has been removed from the client API. Also, the causedBy property of ProcCallExceptions no longer returns an exception, All underlining exception information is returned as text by the getStatusString() method.

11.3.

JDBC improvements

A number of improvements have been made to the JDBC interface as well. Similar to the Java API, the JDBC interface is provided as a single JAR file with no external dependencies. This means that if you use Guava and depended on the Guava library provided by VoltDB, you must either provide your own Guava JAR file or change the dependency to "com.google_voltpatches.common.*".

Other improvements to the JDBC interface include:

  • Support for PreparedStatement.setQueryTimeout()

  • Support for PreparedStatement.setString() for all VoltDB column types

  • Support for DatabaseMetadata.getTypeInfo()

11.4.

SQL support for CASE expressions

VoltDB now supports the CASE-WHEN-THEN-ELSE-END syntax in queries. For example:

SELECT Prod_name, 
    CASE WHEN price > 100.00 
          THEN `Expensive`
          ELSE `Cheap`
    END 
FROM products ORDER BY Prod_name;                      

11.5.

SQL support for HAVING with aggregate functions

VoltDB now supports the use of aggregate functions in the HAVING clause. For example:

SELECT game_id, count(*) FROM games
  GROUP BY game_id
  HAVING count(*) > 1;

11.6.

Default Java heap size increased

The default Java heap size for the VoltDB server process has been increased from 1GB to 2GB. The new default more closely matches recommended settings for general purpose usage, More detailed recommendations can be found in the revised "Server Process Memory Usage" section of the VoltDB Planning Guide.

11.7.

Recovery issues with resized clusters

In previous versions there was an issue where, if a cluster was reduced in size and then restored from snapshots, future command logs of the cluster could not be recovered. One symptom of this issue is the fatal error "No viable snapshots to restore" during recovery.

The problem only occurs if the number of unique partitions in the cluster was reduced, either by reducing the number of servers, reducing the sites per host, or increasing the K-safety factor. With this release, the issue has been corrected. The issue is resolved for any affected databases by following the instructions for upgrading in the previous section; specifically, saving a snapshot, upgrading the software to VoltDB 4.0.1 or later, then restoring the snapshot.

12. Release V4.0

12.1.

Bug fixes

In addition to the new features and enhancements listed above, VoltDB V4.0 includes fixes to a number of limitations in previous versions, including the following:

  • Previously, if a node rejoined the cluster and then the cluster stopped before the node could process any transactions, the command logs could not be recovered. This issue has been resolved.

  • Several issues related to comparisons of or aggregate functions involving null values, which could produce incorrect results, have been fixed.

  • Previously, setting the external interface did not change the interface used by the HTTP port. The HTTP port now uses the external interface specified on the command line.

  • There was an issue where a join with multiple WHERE constraints, one of which was an IN list function evaluated against one column of a multi-column index, would ignore the IN list restriction. This issue has been corrected.

  • Memory management within the csvloader utility has been improved, eliminating out of memory errors that were seen in earlier releases.

Known Limitations

The following are known limitations to the current release of VoltDB. Workarounds are suggested where applicable. However, it is important to note that these limitations are considered temporary and are likely to be corrected in future releases of the product.

1. Elasticity

1.1.

Servers cannot be added if the database contains only replicated tables.

It is not currently possible to add new servers "on the fly" if the database schema contains only replicated tables. The workaround until this is fixed is to perform a catalog update to add a partitioned table (it does not need to contain any data) before adding new servers to the running database.

2. Command Logging

2.1.

Command logs can only be recovered to a cluster of the same size.

To ensure complete and accurate restoration of a database, recovery using command logs can only be performed to a cluster with the same number of unique partitions as the cluster that created the logs. If you restart and recover to the same cluster with the same deployment options, there is no problem. But if you change the deployment options for number of nodes, sites per host, or K-safety, recovery may not be possible.

For example, if a four node cluster is running with four sites per host and a K-safety value of one, the cluster has two copies of eight unique partitions (4 X 4 / 2). If one server fails, you cannot recover the command logs from the original cluster to a new cluster made up of the remaining three nodes, because the new cluster only has six unique partitions (3 X 4 / 2). You must either replace the failed server to reinstate the original hardware configuration or otherwise change the deployment options to match the number of unique partitions. (For example, increasing the site per host to eight and K-safety to two.)

2.2.

Do not use the subfolder name "segments" for the command log snapshot directory.

VoltDB reserves the subfolder "segments" under the command log directory for storing the actual command log files. Do not add, remove, or modify any files in this directory. In particular, do not set the command log snapshot directory to a subfolder "segments" of the command log directory, or else the server will hang on startup.

3. Database Replication

3.1.

The Enterprise Manager cannot restart and recover a replica database as a master.

Using the VoltDB Enterprise Manager, if a replica database was started with command logging, then stopped (intentionally or by accident), the Enterprise Manager cannot restart the database as a normal database using the recover action to reinstate the database's previous state. The Enterprise Manager can restore from a snapshot.

If you want to use the Enterprise Manager to stop a replica and restart it as a normal database, the recommended procedure is:

  1. Stop replication.

  2. Pause the replica.

  3. Use the Enterprise Manager to take a manual snapshot.

  4. Stop the database.

  5. Start the database, choosing "restore from snapshot" as the startup action and the manual snapshot as the source.

Note that this limitation is specific to the Enterprise Manager. Failed replica databases can be recovered manually using the command line.

4. Export

4.1.

Potential loss of export data when cycling all servers

It was possible that if all servers in the cluster fail and rejoin without stopping the database itself, data waiting in the export queue can be lost. This only happens if all servers in the cluster are cycled (stopped and rejoined). The workaround until this problem is resolved is to manually call the @Quiesce system procedure to make sure the export queue is cleared before all servers are stopped and restarted.

5. SQL and Stored Procedures

5.1.

SELECT DISTINCT using multiple columns or expressions is not supported.

Use of SELECT DISTINCT is supported for a single column (such as SELECT DISTINCT Price FROM Inventory). However, using DISTINCT with multiple columns or arithmetic expressions is not currently supported. For example, the following SELECT DISTINCT statements should not be used:

SELECT DISTINCT Price, Discount FROM Inventory
SELECT DISTINCT (Price - Discount) FROM Inventory

5.2.

Do not use assertions in VoltDB stored procedures.

VoltDB currently intercepts assertions as part of its handling of stored procedures. Attempts to use assertions in stored procedures for debugging or to find programmatic errors will not work as expected.

6. Client Interfaces

6.1.

Avoid using decimal datatypes with the C++ client interface on 32-bit platforms.

There is a problem with how the math library used to build the C++ client library handles large decimal values on 32-bit operating systems. As a result, the C++ library cannot serialize and pass Decimal datatypes reliably on these systems.

Note that the C++ client interface can send and receive Decimal values properly on 64-bit platforms.

7. Runtime Issues

7.1.

Partially removing snapshot files from the database servers can cause recovery to fail.

To ensure proper recovery on startup, either from command logs or the last database snapshot, make sure all snapshot files — or at least complete subsets of the snapshot files — are available on the nodes of the cluster. If you delete or move snapshot files (for example, copying all snapshot files to a single node) be sure to keep all of the files for each node together. Do not selectively delete or move individual files or else the recovery may fail.

7.2.

VoltDB will not start if the user does not have execute privileges to the /tmp directory.

If the HTTP port is enabled (which it is by default) but the process does not have execute privileges for the /tmp directory, VoltDB throws a fatal exception on startup. The error message indicates that the process could not load the native library for the Snappy web server.

The workaround is to either use an account that has execute permission for the /tmp directory or specify an alternate directory that the account can access by assigning the environment variable VOLTDB_OPTS = "-Djava.io.tmpdir={alternate-tmpdir}".

7.3.

Under certain conditions, automated snapshots may stop occurring without notice.

Automatic snapshots (enabled through the deployment file) are intended to create periodic snapshots on a scheduled basis while the database is running. However, there are instances when the automatic snapshots stop occurring. This problem is sporadic and only happens on K-safe clusters where nodes fail and rejoin.

Once automatic snapshots stop, they will not restart until the cluster stops and restarts. The workaround is, after a node fails and rejoins, to check the logs to make sure automatic snapshots are still occurring. If not you can create a cron job to periodically take snapshots manually using the voltadmin save command until the next time the cluster reboots.

8. Enterprise Manager

8.1.

Manual snapshots not copied to the Management Server properly.

Normally, manual snapshots (those created with the Take a Snapshot button) are copied to the management server. However, if automated snapshots are also being created and copied to the management server, it is possible for an automated snapshot to override the manual snapshot.

If this happens, the workaround is to turn off automated snapshots (and their copying) temporarily. To do this, uncheck the box for copying snapshots, set the frequency to zero, and click OK. Then re-open the Edit Snapshots dialog and take the manual snapshot. Once the snapshot is complete and copied to the management server (that is, the manual snapshot appears in the list on the dialog box), you can re-enable copying and automated snapshots.

8.2.

Old versions of Enterprise Manager files are not deleted from the /tmp directory

When the Enterprise Manager starts, it unpacks files that the web server uses into a subfolder of the /tmp directory. It does not delete these files when it stops. Under normal operation, this is not a problem. However, if you upgrade to a new version of the Enterprise Edition, files for the new version become intermixed with the older files and can result in the Enterprise Manager starting databases using the wrong version of VoltDB. To avoid this situation, make sure these temporary files are deleted before starting a new version of VoltDB Enterprise Manager.

The /tmp directory is emptied every time the server reboots. So the simplest workaround is to reboot your management server after you upgrade VoltDB. Alternately, you can delete these temporary files manually by deleting the winstone subfolders in the /tmp directory:

$ rm -vr /tmp/winstone*

8.3.

Enterprise Manager configuration files are not upwardly compatible.

When upgrading VoltDB Enterprise Edition, please note that the configuration files for the Enterprise Manager are not upwardly compatible. New product features may make existing database and/or deployment definitions unusable. It is always a good idea to delete existing configuration information before upgrading. You can delete the configuration files by deleting the ~/.voltdb directory. For example:

$ rm -vr ~/.voltdb

8.4.

Enterprise Manager cannot start two databases on the same server.

In the past, it was possible to run two (or more) databases on a single physical server by defining two logical servers with the same IP address and making the ports for each database unique. However, as a result of internal optimizations introduced in VoltDB 2.7, this technique no longer works when using the Enterprise Manager.

We expect to correct this limitation in a future release. Note that it is still possible to start multiple databases on a single server manually using the VoltDB shell commands.

Implementation Notes

The following notes provide details concerning how certain VoltDB features operate. The behavior is not considered incorrect. However, this information can be important when using specific components of the VoltDB product.

1. SQL

1.1.

Do not use UPDATE to change the value of a partitioning column

For partitioned tables, the value of the column used to partition the table determines what partition the row belongs to. If you use UPDATE to change this value and the new value belongs in a different partition, the UPDATE request will fail and the stored procedure will be rolled back.

Updating the partition column value may or may not cause the record to be repartitioned (depending on the old and new values). However, since you cannot determine if the update will succeed or fail, you should not use UPDATE to change the value of partitioning columns.

The workaround, if you must change the value of the partitioning column, is to use both a DELETE and an INSERT statement to explicitly remove and then re-insert the desired rows.

1.2.

Certain SQL syntax errors result in the error message "user lacks privilege or object not found" when compiling the runtime catalog.

If you refer to a table or column name that does not exist, the VoltDB compiler issues the error message "user lacks privilege or object not found". This can happen, for example, if you misspell a table or column name.

Another situation where this occurs is if you mistakenly use double quotation marks to enclose a string literal (such as WHERE ColumnA="True"). ANSI SQL requires single quotes for string literals and reserves double quotes for object names. In the preceding example, VoltDB interprets "True" as an object name, cannot resolve it, and issues the "user lacks privilege" error.

The workaround is, if you receive this error, to look for misspelled table or columns names or string literals delimited by double quotes in the offending SQL statement.

2. Runtime

2.1.

File Descriptor Limits

VoltDB opens a file descriptor for every client connection to the database. In normal operation, this use of file descriptors is transparent to the user. However, if there are an inordinate number of concurrent client connections, or clients open and close many connections in rapid succession, it is possible for VoltDB to exceed the process limit on file descriptors. When this happens, new connections may be rejected or other disk-based activities (such as snapshotting) may be disrupted.

In environments where there are likely to be an extremely large number of connections, you should consider increasing the operating system's per-process limit on file descriptors.

3. Recovery

3.1.

Troubleshooting Recovery Issues

There are several situations where an attempt to recover a database — either from a snapshot or command logs — may fail. For example, restoring a snapshot where a unique index has been added to a table can result in a constraint violation that causes the restore, and the database, to fail. Similarly, a command log may contain a transaction that originally succeeded but fails and raises an exception during playback.

In both of these situations, VoltDB issues a fatal error and stops the database to avoid corrupting the contents.

Although protecting you from an incomplete recovery is the appropriate default behavior, there may be cases where you want to recover as much data as possible, with full knowledge that the resulting data set does not match the original. VoltDB provides two techniques for performing partial recoveries in case of failure:

  • Logging constraint violations during snapshot restore

  • Performing command log recovery in safe mode

Logging constraint violations — There are several situations that can cause a snapshot restore to fail because of constraint violations. Rather than have the operation fail as a whole, you can request that constraint violations be logged to a file instead. This way you can review the tuples that were excluded and decide whether to ignore or replace their content manually after the restore completes.

To perform a manual restore that logs constraint violations rather than stopping when they occur, you use a special JSON form of the @SnapshotRestore system procedure. You specify the path of the log files in a JSON attribute, duplicatePaths. For example, the following commands perform a restore of snapshot files in the directory /var/voltdb/snapshots/ with the unique identifier myDB. The restore operation logs constraint violations to the directory /var/voltdb/logs.

$ sqlcmd
1> exec @SnapshotRestore '{ "path":"/https/docs.voltactivedata.com/var/voltdb/snapshots/", 
                            "nonce":"myDB", 
                            "duplicatesPath":"/var/voltdb/logs/" }';
2> exit

Constraint violations are logged as needed, one file per table, to CSV files with the name {table}-duplicates-{timestamp}.csv.

Safe Mode Recovery — On rare occasions, recovering a database from command logs may fail. This can happen, for example, if a stored procedure introduces non-deterministic content. If a recovery fails, the specific error is known. However, there is no way for VoltDB to know the root cause or how to continue. Therefore, the recovery fails and the database stops.

When this happens, VoltDB logs the last successful transaction before the recovery failed. You can then ask VoltDB to recover up to but not including the failing transaction by performing a recovery in safe mode.

You request safe mode by adding the --safemode switch to the command line when starting the recovery operation, like so:

$ voltdb recover --safemode -license ~/license.xml

When VoltDB recovers from command logs in safe mode it enables two distinct behaviors:

  • Snapshots are restored, logging any constraint violations

  • Command logs are replayed up to the last valid transaction

This means that if you are recovering using an automated snapshot (rather than command logs), you can recover some data even if there are constraint violations during the snapshot restore. Also, when recovering from command logs, VoltDB will ignore constraint violations in the command log snapshot and replay all transactions that succeeded in the previous attempt.

It is important to note that to successfully use safe mode with command logs, you must perform a regular recovery operation first — and have it fail — so that VoltDB can determine the last valid transaction. Also, if the command log contains both constraint violations and failed transactions, you may need to run recovery in safe mode multiple times to recover as much data as possible.

Warning

Finally, it is critically important to recognize that the techniques described above do not produce a complete copy of the original database or resolve the underlying problem that caused the initial recovery to fail These techniques should never be attempted without careful consideration and full knowledge and acceptance of the risks associated with partial data recovery.

4. Logging

4.1.

All logging messages reported by the VoltDB server are timestamped using GMT (Greenwich Mean Time).

This is not a problem when looking at VoltDB logs separately. However, you should be aware of this distinction when integrating logging of VoltDB with logging of other system components that use the local time zone (rather than GMT). You may want to convert one or the other log streams so the time zones match.

4.2.

To simplify logging, a file has been added to the distribution listing all of the VoltDB logging categories.

The file voltdb/log4j.xml lists all of the VoltDB-specific logging categories. It also serves as a useful logging schema. The sample applications and the VoltDB shell commands use this file to configure logging and it is recommended for new application development.

Software Previews

This release includes two new features that are currently under development. Although functional, we at VoltDB are still investigating the appropriate direction and level of completeness required for these features. We would appreciate feedback from the user community.

1.1.

Export to Kafka

VoltDB now supports export to Apache Kafka, a distributed commit log service that operates like a message queue. Kafka is selectable as the target export client, similar to the existing file and JDBC export clients. Customers interested in trying our new Kafka export capabilities and providing feedback, please contact [email protected] for details.

1.2.

Migrate from MySQL to VoltDB

VoltDB includes a new utility, voltify, that helps you migrate from an existing MySQL database to VoltDB. The utility connects to a running MySQL database and creates a target schema and starter project in VoltDB to match the source database. If you are interested, you can find instructions for volity in the VoltDB github repository at the following URL:

http://github.com/VoltDB/voltdb/blob/master/tools/voltify-README.md

We encourage anyone who tries it to provide feedback in the VoltDB forums, http://forum.voltdb.com. Thank you.