Forum: News & Announcements

Post: Good VoltDB Q&A capture from common newcomer's questions

Good VoltDB Q&A capture from common newcomer's questions
Patrice Berube
Apr 14, 2015
I'm Patrice, new to VoltDB product. I recently join VoltDB coming from many years in DW industry. I capture some Q&A from common questions I heard during my learning curve journey. Iím sharing them hoping they will be as valuable to you as they were for me.

Can stored procedures operate on data directly?
All data access is done through SQL.

Is there a programatic interface for stored procedures to invoke SQL operations (not by passing a string containing a full SQL query)?
SQL queries are essentially prepared statements. Statements support parameterized expressions - but table and column names are fixed and can't be changed or constructed dynamically within a stored procedure. Ad-hoc SQL can be issued to the database from a client. These statements are run in auto-commit mode.

Is there support for cross-partition indexing and range queries?
No. Indexes are maintained per-partition. VoltDB partitions on a consistent hashing function and doesn't optimize cross-partition range queries.

How does VoltDB handle cross partition transactions?
Cross partitions that modify data are two phase committed across partitions. Transactions that consist of one distributed read batch are optimized so that remote partitions never block or stall.

Is there a difference in VoltDB between global transactions and ones which access objects from only a few partitions?
There is code internally that optimizes some-partition queries vs. all-partition queries however it is not yet exposed to end-users. It is used internally for some elasticity rebalancing features.

Does VoltDB support reconfiguration of the group of nodes it is deployed on?
Yes. You can fail and rejoin servers (rejoined servers can be new hardware); you can elastically add new servers to an existing cluster.

What happens when the network partitions? to the majority partition? and to the minority partition?
Please see:

Is there support for globally consistent snapshot/checkpoint?
Yes. All snapshots are globally consistent. The user can initiate a snapshot. The snapshot can be serialized as binary data or as CSV data.

Is there support to configure sync to disk. If so how can the knobs be used?

Is there support for transaction consistent snapshots across servers/partitions?
Yes. All snapshots are transaction consistent across partitions, it is the only option

Is there support of persistent(store on disk) and ephemeral(not stored on disk) tables ?
Not at this point in time. We have seen this feature request before. However, this feature is very much a "point gun at foot" kind of option. The current system does not allow different durability settings on a per-table basis.

Are there any cluster coordination functions like distributed lock, leader election available in voltdb?
Not sure to understand this question. VoltDB embeds a modified version of ZooKeeper. Many of the distributed systems features in the cluster use concepts like leader election. They are not, however, exposed to end-users as part of the transaction model. VoltDB single threaded Architecture does not use Locks.

What are the parameter types for the stored procedures?

Can we enable post commit triggers?
By design VoltDB does not need triggers, transaction are define by Stored Procedure(SP) instead of single SQL. Post-commit trigger are achievable in 2 ways: 1- Imbed logic into Callback SP on async calls, 2- Inserting data into an export table for further outside database action.

Is there an option for quorum based replication?
VoltDB replicates WRITE transactions to all replicas in a cluster before responding to a client request. WAN replication is always asynchronous between clusters. Quorum does not suit to VoltDB architecture.

Does VoltDB allow "hot node splits"? If one node is being overtaxed can that workload be split on the fly?
VoltDB allows online elastic expansion of a cluster. This expansion does not directly split hot nodes. It rebalances from all active nodes to the newly added node.

Does VoltDB allow collocation or merging of partitions on the fly?

Is there any caveat to serialized reads? (Dirty reads would be preferred in some cases.)
We don't currently allow dirty reads. We do load balance read-only transactions across replicas though.

Anonymous procedures in Java Syntax?
VoltDB supports: adhoc SQL, Java stored procedures, SQL-only stored procedure declared in DDL, Groovy stored procedures. VoltDB also auto-generate efficient CRUD operations for tables (Table.insert, Table.delete...).