Releases: dgraph-io/dgraph
Dgraph v0.9.1 Release
This release contains a couple of small changes in the HTTP API.
X-Dgraph-StartTs
header goes away. The StartTs is now passed as a path parameter instead of a header.- For
/commit
API, keys are passed in the body instead ofX-Dgraph-Keys
header.
The HTTP docs contain elaborate examples.
Dgraph v0.9.0 Release
The released binaries would not work with data from older versions. You can follow these instructions to upgrade Dgraph.
The latest release has a lot of breaking changes but also brings powerful features like Transactions, support for CJK and custom tokenization.
Note: Starting from this release, every read and write is done via transactions. You could run read-only transactions, read-write or write-only transactions; but there's no way to avoid transactional behavior.
Features
- Dgraph adds support for distributed ACID transactions (a blog post is in works). Transactions can be done via the Go, Java or HTTP clients (JS client coming). See docs here.
- Support for Indexing via Custom tokenizers.
- Support for CJK languages in the full-text index.
Breaking changes
Running Dgraph
- We have consolidated all the
server
,zero
,live/bulk-loader
binaries into a singledgraph
binary for convenience. Instructions for running Dgraph can be found in the docs. - For Dgraph server, Raft ids can be assigned automatically. A user can optionally still specify an ID, via
--idx
flag. --peer
flag which was used to specify another Zero instance’s IP address is being replaced by--zero
flag to indicate the address corresponds to Dgraph zero.port
,grpc_port
andworker_port
flags have been removed from Dgraph server and Zero. The ports are:
- Internal Grpc: 7080
- HTTP: 8080
- External Grpc: 9080 (Dgraph server only)
Users can set port_offset
flag, to modify these fixed ports.
Queries
- Queries, mutations and schema updates are done through separate endpoints. Queries can no longer have a mutation block.
- Queries can be done via
Query
Grpc endpoint (it was calledRun
before) or the/query
HTTP handler. _uid_
is renamed touid
. So queries now need to request foruid
. Example
{
bladerunner(func: eq(name@en, "Blade Runner")) {
uid
name@en
}
}
- Facets response structure has been modified and is a lot flatter. Facet key is now
predicate|facet_name
.
Examples for Go client and HTTP. - Query latency is now returned as numeric (ns) instead of string.
Recurse
is now a directive. So queries withrecurse
keyword at root won't work anymore.- Syntax for
count
at root has changed. You need to ask forcount(uid)
, instead ofcount()
.
Mutations
- Mutations can only be done via
Mutate
Grpc endpoint or via/mutate
HTTP handler. Mutate
Grpc endpoint can be used to set/ delete JSON, or set/ delete a list of NQuads and set/ delete raw RDF strings.- Mutation blocks don't require the mutation keyword anymore. Here is an example of the new syntax.
{
set {
<name> <is> <something> .
<hometown> <is> "San Francisco" .
}
}
Upsert
directive and mutation variables go away. Both these functionalities can now easily be achieved via transactions.
Schema
<*> <pred> <*>
operations, that is deleting a predicate can't be done via mutations anymore. They need to be done viaAlter
Grpc endpoint or via the/alter
HTTP handler.- Drop all is now done via
Alter
. - Schema updates are now done via
Alter
Grpc endpoint or via/alter
HTTP handler.
Go client
Query
Grpc endpoint returns response in JSON underJson
field instead of protocol buffer.client.Unmarshal
method also goes away from the Go client. Users can usejson.Unmarshal
for unmarshalling the response.- Response for predicate of type
geo
can be unmarshalled into a struct. Example here. Node
andEdge
structs go away along with theSetValue...
methods. We recommend usingSetJson
andDeleteJson
fields to do mutations.- Examples of how to use transactions using the client can be found at https://docs.dgraph.io/clients/#go.
Embedded Dgraph
Embedded dgraph goes away. We haven’t seen much usage of this feature. And it adds unnecessary maintenance overhead to the code.
Others
- Dgraph live no longer stores external ids. And hence the
xid
flag is gone.
Bugfixes
Dgraph v0.8.3 Release
The released binaries would only work with data from v0.8.2. If you are upgrading from an older version, you can follow these instructions to upgrade Dgraph.
Features
- dgraphzero binary for controlling the cluster and moving data between nodes based on load.
- Allow doing mutations using
SetObject
andDeleteObject
methods from the Go client. - Add ability to delete all data from the database.
Improvements
dgraph-bulk-loader
(bulkloader) - Lot of memory improvements. The dgraph-bulk-loader is now faster than ever.- Aggregate uids stored in a variable over levels for recurse query.
- Return root key in response even if there are no results. #1533
- Enable
expand(_all_)
with recurse. - Remove ObjectType from NQuad proto message.
- Offical support for precompiled Windows binaries.
Bugfixes
Dgraph v0.8.2 Release
The released binaries wouldn't work with data from older versions. You can follow these instructions to upgrade Dgraph from an older version.
Features
- Bulkloader - Load data into Dgraph at least 5x faster.
- Allow setting multiple scalar values.
- Support for MultiPolygon type for Geo values.
- Add ability to sort by multiple predicates.
- Allow ability to upsert nodes using eq function.
Improvements
- Backup requests for intracluster retrievals. If the first one doesn't finish in 10ms, we try another server.
- Make reads/writes follow the requirements of linearizability.
- Allow value variables in inequality functions.
Bugfixes
.
language handling in functions. #1337- Recurse query panics. #1350
- Variable not populated or missing. #1356
- Panic in appendDummyValues. #1359
- Write hard-state after persisting entries. #1365
- Can't query schema using gRPC interface. #1369
- Facet matrix not in sync with uid matrix after filtering. #1362
- Empty predicate crashes db. #1381
- Mutation with object vars crashes DB. #1382
- Sort and validate facets coming from clients. #1419
- Check for empty predicate in schema mutation. #1447
- Filter may override root query. #1455
- #1444
- #1427
- #1474
- #1464
- #1477
Dgraph v0.8.1 Release
The released binaries wouldn't work with data from older versions. You can follow these instructions to upgrade Dgraph from an older version.
Changes from v0.8.0
- It's mandatory to specify the type of the tokenizer while specifying an index in the schema.
- Renamed
dateTime
tokenizer toyear
. - It's mandatory to specify the
memory_mb
flag while starting Dgraph. - JSON response is nested under
data
anderrors
key in accordance with the GraphQL spec.
Features
- Ability to sort by facets.
- Support for checkpointing in Dgraphloader.
- Allow aggregations at the top level of the query.
Improvements
Server
- Optimizations in JSON encoding so that it uses lesser memory (157x) and is faster (512x).
- Optimize Inequality filters. Fetch data keys directly and compare if their count is less than the number of index keys to be fetched.
- Return JSON results in the same order as the query.
- Get rid of
sync.Pool
inpostings
which stabilizes memory used by the Dgraph process. - Compress posting lists using bit packing and delta encoding with simd instructions so that it uses lesser memory.
Client
- Helper function to delete a predicate.
- Helper function to delete a node.
- Helper function to delete an edge.
- Allow setting string values with lang tags.
- Make
BatchMutation.Flush()
retry logic tunable for Go client through MaxRetries. (#796)
Bugfixes
- Return count even if it's zero. (#1212)
uid_in
function should accept hexidecimal for uid. (#1204)- Dgraphloader should allow spaces between comma separated files. (#1209)
- Fix bug when using variables in mutations. (#1217)
- Disallow repeated arguments. (#1223)
- Fix bad memory usage while serializing to JSON. (#982, #1138, #1227)
- Ensure variables for sorting is a value variable. (#1235)
- Clear out struct given in
client.Unmarshal
before unmarshalling response using the Go client. (#1216) - Fix Maximum call stack size exceeded error on UI. (#1201)
- Delete reverse edge when doing
S P *
deletion. (#1271) - Panic runtime error. (#1284)
- Count index not updated after schema update. (#1247)
- Slow start in embedded mode. (#1246)
- Throw an error if a variable is used before definition. (#1322)
- Throw an error if NQuads are not separated by a newline. (#1320)
- Limit number of results returned as part of
@normalize
. (#1268) - Double click on web UI cyclic graph causes an infinite loop. (#1302)
- Incorrect function behaviour when language is not specified. (#1295)
- Stop storing responses in Dgraph browser. Fix localStorage quota reached error. (#981)
Dgraph v0.8.0 Release
This release would not work on v0.7 data directly. Needs backup and reimport.
Features
Server
- Suppport
has
function. - Support for variables in mutation blocks.
- Support for k shortest paths.
- Support deletion of predicate.
- Support for
uid_in
function. - ignoreReflex directive to remove reflexive edges from results.
- Allow to use Dgraph as a library.
- Ability to monitor server metrics.
Client
- Go client now supports an
Unmarshal
function which allows unmarshalling the protocol buffer response to a custom struct. - Add support for storing and retrieving raw bytes.
- Cleaner and more intuitive API for doing mutations.
Improvements
- Move away from RocksDB and get rid of CGO. Start using Badger.
- Assign uids sequentially.
- Allow retrieving other children with
@groupby
. - Allow aliases for math expressions.
- Support filtering using multiple tokens with
eq
. - Better language lists semantics. Issue #1010
- Add a
uid
function which can be used for filtering uids at any level. - Allow adding
@count
indexes which allow for faster count comparison queries at the root. - Optimisations in how we store Posting List data structure. Store uids separately.
- Allow specifying a max depth argument for the shortest path.
- Support for month, day, hour indexes for dateTime datatype.
- Get rid of
lhmap
and add an LRU Cache. We don't do Stop the World anymore.
Changes (from v0.7.7)
date
type is no longer supported as a schema type in Dgraph. You should usedateTime
instead.- Change of syntax for querying by id.
# Before
{
me(id: [0x1, 0x2]) {
...
}
}
# Now
{
me(func: uid(0x1, 0x2)) {
...
}
}
- Dgraph doesn't fingerprint
xids
anymore. They are now treated similarly to other edges. So now if you had anxid
and you wanted to query by it you would use.
# You need to have an index on xid for calling `eq` function.
{
me(func: eq(xid, "alice")) {
....
}
}
/admin/backup
is now/admin/export
. It outputs blank nodes which can now be used to load data into a fresh instance.- There is a separate port for
http
(default 8080) andgrpc
(default 9080) now.
Bugfixes
Dgraph v0.7.7 Release
Features
- Support for Group by
- Hash tokenizer for strings.
- Support for
count
at root. - Suppport for reloading TLS certs.
Improvements
- Allow setting id as a GraphQL variable.
- Support for variables in inequality functions.
- Support for count and alias for
_predicate_
. - Support alias for
_uid_
. - A new and improved Dgraph browser.
Bugfixes
Dgraph v0.7.6 Release
Features
- Support for aggregating over levels and mathematical operations on value variables.
- Support for
S P *
andS * *
deletion. - Support for
expand_all
.
Improvements
- Regex searches are now faster with support for trigram indexing.
- Parallelize full scan by using multiple iterators.
- Change function name. geq => gq, leq => le
- Additional filtering to ensure returned values match language specified in function invocation.
- Support alias for var and aggregation functions.
- Support for adding facets using Go client.
Bugfixes
- Fix cascade with ordering.
- Fixes to full text search used with multiple languages.
- Fixes in RDF parsing (throw error if type not identified).
- Allow only one sortable index per predicate.
- Return error if attribute is not indexed and used in functions.
- Normalize directive returns all unique paths in a subgraph.
- Fix missing port in address issue #837.
- Fix issue with applyOrderAndPagination #889.
- Couldn't parse facet value, issue #826.
- Bugs related to string quoting, issue #862.
- Retrieve facets for predicate with language, issue #878.
Dgraph v0.7.5 Release
This release mainly focuses on small bug-fixes.
Features
- Support for GraphQL variables in functions.
- View JSON response in UI.
Bugfixes
Dgraph v0.7.4 Release
Features
- Full-Text Search:
- Introduction of new functions:
alloftext
andanyoftext
. - New index type:
fulltext
. - Language-specific stemmers and stop-words lists.
- Support for 15 languages.
- Introduction of new functions:
- Mutate and get schema through
/query
endpoint usingschema
block. - TLS support for interaction between Dgraph server and client.
- Support for aggregation, sorting and retrieving value variables.
- Support for multiple tokenizers per predicate.
- Recursive queries to traverse the graph till leafs.
- Filter by count at the root.
- Support for
avg
aggregation function. - Support for
regexp
matching on strings. - Filtering based on facets.
- User Interface:
- Support for showing results in a tree format, render facets, aggregation and shortest path results.
- Ability to filter/delete previous queries.
- Scratchpad to store temporary UID => name mapping.
- Regex to specify the predicate to show as part of Graph.
Improvements
- Move to Go 1.8.
- Improve shortest path result to return path information.
- Switch
Int
type to int64 from int32. - Improve performance of sorting (
orderasc
andorderdesc
). - Stricter handling of commas and quotes while parsing the query.
- Removal of the schema file. Schema stored within Dgraph.
Bugfixes
- Aggregation functions returned global aggregates rather than per entity.
- Pagination crashes on some invalid offsets.
- Filtering on reverse UIDs returns an empty result.
- Better errors on non-indexed attributes.
- Mutation with UID
0
crashes the server - Sorting on strings returned incorrect results.