forked from arangodb/arangodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
7399 lines (4938 loc) · 296 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
v3.0.0 (XXXX-XX-XX)
-------------------
* The order of AQL functions VALUES and KEYS has never been guaranteed and
by accident it had the "correct" ordering when iteratoring over Objects that
were not loaded from the database. This behaviour is now changed by
introduction of VelocyPack and no ordering is guaranteed unless you specify
the do sort parameter.
* removed configure option `--enable-logger`
* added AQL array comparison operators
All AQL comparison operators now lso exist in an array variant. In the
array variant, the operator is prefixed with one of the keywords *ALL*, *ANY*
or *NONE*. Using one of these keywords changes the operator behavior to
execute the comparison operation for all, any, or none of its left hand
argument values. It is therefore expected that the left hand argument
of an array operator is an array.
Examples:
[ 1, 2, 3 ] ANY IN [ 4, 5, 6 ] // false
[ 1, 2, 3 ] ANY IN [ 1, 42 ] // true
[ 1, 2, 3 ] ALL IN [ 2, 3, 4 ] // false
[ 1, 2, 3 ] ALL IN [ 1, 2, 3 ] // true
[ 1, 2, 3 ] NONE IN [ 3 ] // false
[ 1, 2, 3 ] NONE IN [ 23, 42 ] // true
[ 1, 2, 3 ] ANY == 2 // true
[ 1, 2, 3 ] ANY == 4 // false
[ 1, 2, 3 ] ANY > 0 // true
[ 1, 2, 3 ] ANY <= 1 // true
[ 1, 2, 3 ] ALL > 2 // false
[ 1, 2, 3 ] ALL > 0 // true
[ 1, 2, 3 ] ALL >= 3 // false
[ 1, 2, 3 ] NONE < 99 // false
[ 1, 2, 3 ] NONE > 10 // true
["foo", "bar"] ALL != "moo" // true
["foo", "bar"] NONE == "bar" // false
* improved AQL optimizer to remove unnecessary sort operations in more cases
* allow enclosing AQL identifiers in forward ticks in addition to using
backward ticks
This allows convenient writing of AQL queries in JavaScript template strings
(that is itself delimited with backticks), e.g.
var q = `FOR doc IN ´collection´ RETURN doc.´name´`;
* allow to set `print.limitString` to configure the number of characters
to output before truncating
* make logging configurable per log "topic"
`--log.level <level>` sets the global log level to <level>, e.g. `info`,
`debug`, `trace`.
`--log.level topic=<level>` sets the log level for a specific topic.
Currently, the following topics exist: `collector`, `compactor`, `mmap`,
`performance`, `queries`, and `requests`. `performance` and `requests` are
set to FATAL by default. `queries` is set to info. All others are
set to the global level by default.
The new log option `--log.output <definition>` allows directing the global
or per-topic log output to different outputs. The output definition
"<definition>" can be one of
"-" for stdin
"+" for stderr
"syslog://<syslog-facility>"
"syslog://<syslog-facility>/<application-name>"
"file://<relative-path>"
The option can be specified multiple times in order to configure the output
for different log topics. To set up a per-topic output configuration, use
`--log.output <topic>=<definition>`, e.g.
queries=file://queries.txt
logs all queries to the file "queries.txt".
* the option `--log.requests-file` is now deprecated. Instead use
`--log.level requests=info`
`--log.output requests=file://requests.txt`
* the option `--log.facility` is now deprecated. Instead use
`--log.output requests=syslog://facility`
* the option `--log.performance` is now deprecated. Instead use
`--log.level performance=trace`
* removed option `--log.source-filter`
* removed configure option `--enable-logger`
* change collection directory names to include a random id component at the end
The new pattern is `collection-<id>-<random>`, where `<id>` is the collection
id and `<random>` is a random number. Previous versions of ArangoDB used a
pattern `collection-<id>` without the random number.
ArangoDB 3.0 understands both the old and name directory name patterns.
* removed mostly unused internal spin-lock implementation
* removed support for pre-Windows 7-style locks. This removes compatibility with
Windows versions older than Windows 7 (e.g. Windows Vista, Windows XP) or
Windows 2008R2 (e.g. Windows 2008).
* changed names of sub-threads started by arangod
* added option `--default-number-of-shards` to arangorestore, allowing creating
collections with a specifiable number of shards from a non-cluster dump
* removed support for CoffeeScript source files
* removed undocumented SleepAndRequeue
* added WorkMonitor to inspect server threads
* when downloading a Foxx service from the web interface the suggested filename
now takes the form $name@$version.zip instead of simply "app.zip"
* the `@arangodb/request` response object now stores the parsed JSON response
body in a property `json` instead of `body` when the request was made using the
`json` option. The `body` instead contains the response body as a string.
v2.8.3 (XXXX-XX-XX)
-------------------
* fixed AQL filter condition collapsing for deeply-nested cases, potentially
enabling usage of indexes in some dedicated cases
* added parentheses in AQL explain command output to correctly display precedence
of logical and arithmetic operators
* Foxx Model event listeners defined on the model are now correctly invoked by
the Repository methods (issue #1665)
* Deleting a Foxx service in the frontend should now always succeed even if the
files no longer exist on the file system (issue #1358)
* Routing actions loaded from the database no longer throw exceptions when
trying to load other modules using "require"
v2.8.2 (2016-02-09)
-------------------
* the continuous replication applier will now prevent the master's WAL logfiles
from being removed if they are still needed by the applier on the slave. This
should help slaves that suffered from masters garbage collection WAL logfiles
which would have been needed by the slave later.
The initial synchronization will block removal of still needed WAL logfiles
on the master for 10 minutes initially, and will extend this period when further
requests are made to the master. Initial synchronization hands over its handle
for blocking logfile removal to the continuous replication when started via
the *setupReplication* function. In this case, continuous replication will
extend the logfile removal blocking period for the required WAL logfiles when
the slave makes additional requests.
All handles that block logfile removal will time out automatically after at
most 5 minutes should a master not be contacted by the slave anymore (e.g. in
case the slave's replication is turned off, the slaves loses the connection
to the master or the slave goes down).
* added all-in-one function *setupReplication* to synchronize data from master
to slave and start the continuous replication:
require("@arangodb/replication").setupReplication(configuration);
The command will return when the initial synchronization is finished and the
continuous replication has been started, or in case the initial synchronization
has failed.
If the initial synchronization is successful, the command will store the given
configuration on the slave. It also configures the continuous replication to start
automatically if the slave is restarted, i.e. *autoStart* is set to *true*.
If the command is run while the slave's replication applier is already running,
it will first stop the running applier, drop its configuration and do a
resynchronization of data with the master. It will then use the provided configration,
overwriting any previously existing replication configuration on the slave.
The following example demonstrates how to use the command for setting up replication
for the *_system* database. Note that it should be run on the slave and not the
master:
db._useDatabase("_system");
require("@arangodb/replication").setupReplication({
endpoint: "tcp://master.domain.org:8529",
username: "myuser",
password: "mypasswd",
verbose: false,
includeSystem: false,
incremental: true,
autoResync: true
});
* the *sync* and *syncCollection* functions now always start the data synchronization
as an asynchronous server job. The call to *sync* or *syncCollection* will block
until synchronization is either complete or has failed with an error. The functions
will automatically poll the slave periodically for status updates.
The main benefit is that the connection to the slave does not need to stay open
permanently and is thus not affected by timeout issues. Additionally the caller does
not need to query the synchronization status from the slave manually as this is
now performed automatically by these functions.
* fixed undefined behavior when explaining some types of AQL traversals, fixed
display of some types of traversals in AQL explain output
v2.8.1 (2016-01-29)
-------------------
* Improved AQL Pattern matching by allowing to specify a different traversal
direction for one or many of the edge collections.
FOR v, e, p IN OUTBOUND @start @@ec1, INBOUND @@ec2, @@ec3
will traverse *ec1* and *ec3* in the OUTBOUND direction and for *ec2* it will use
the INBOUND direction. These directions can be combined in arbitrary ways, the
direction defined after *IN [steps]* will we used as default direction and can
be overriden for specific collections.
This feature is only available for collection lists, it is not possible to
combine it with graph names.
* detect more types of transaction deadlocks early
* fixed display of relational operators in traversal explain output
* fixed undefined behavior in AQL function `PARSE_IDENTIFIER`
* added "engines" field to Foxx services generated in the admin interface
* added AQL function `IS_SAME_COLLECTION`:
*IS_SAME_COLLECTION(collection, document)*: Return true if *document* has the same
collection id as the collection specified in *collection*. *document* can either be
a [document handle](../Glossary/README.md#document-handle) string, or a document with
an *_id* attribute. The function does not validate whether the collection actually
contains the specified document, but only compares the name of the specified collection
with the collection name part of the specified document.
If *document* is neither an object with an *id* attribute nor a *string* value,
the function will return *null* and raise a warning.
/* true */
IS_SAME_COLLECTION('_users', '_users/my-user')
IS_SAME_COLLECTION('_users', { _id: '_users/my-user' })
/* false */
IS_SAME_COLLECTION('_users', 'foobar/baz')
IS_SAME_COLLECTION('_users', { _id: 'something/else' })
v2.8.0 (2016-01-25)
-------------------
* avoid recursive locking
v2.8.0-beta8 (2016-01-19)
-------------------------
* improved internal datafile statistics for compaction and compaction triggering
conditions, preventing excessive growth of collection datafiles under some
workloads. This should also fix issue #1596.
* renamed AQL optimizer rule `remove-collect-into` to `remove-collect-variables`
* fixed primary and edge index lookups prematurely aborting searches when the
specified id search value contained a different collection than the collection
the index was created for
v2.8.0-beta7 (2016-01-06)
-------------------------
* added vm.runInThisContext
* added AQL keyword `AGGREGATE` for use in AQL `COLLECT` statement
Using `AGGREGATE` allows more efficient aggregation (incrementally while building
the groups) than previous versions of AQL, which built group aggregates afterwards
from the total of all group values.
`AGGREGATE` can be used inside a `COLLECT` statement only. If used, it must follow
the declaration of grouping keys:
FOR doc IN collection
COLLECT gender = doc.gender AGGREGATE minAge = MIN(doc.age), maxAge = MAX(doc.age)
RETURN { gender, minAge, maxAge }
or, if no grouping keys are used, it can follow the `COLLECT` keyword:
FOR doc IN collection
COLLECT AGGREGATE minAge = MIN(doc.age), maxAge = MAX(doc.age)
RETURN {
minAge, maxAge
}
Only specific expressions are allowed on the right-hand side of each `AGGREGATE`
assignment:
- on the top level the expression must be a call to one of the supported aggregation
functions `LENGTH`, `MIN`, `MAX`, `SUM`, `AVERAGE`, `STDDEV_POPULATION`, `STDDEV_SAMPLE`,
`VARIANCE_POPULATION`, or `VARIANCE_SAMPLE`
- the expression must not refer to variables introduced in the `COLLECT` itself
* Foxx: mocha test paths with wildcard characters (asterisks) now work on Windows
* reserved AQL keyword `NONE` for future use
* web interface: fixed a graph display bug concerning dashboard view
* web interface: fixed several bugs during the dashboard initialize process
* web interface: included several bugfixes: #1597, #1611, #1623
* AQL query optimizer now converts `LENGTH(collection-name)` to an optimized
expression that returns the number of documents in a collection
* adjusted the behavior of the expansion (`[*]`) operator in AQL for non-array values
In ArangoDB 2.8, calling the expansion operator on a non-array value will always
return an empty array. Previous versions of ArangoDB expanded non-array values by
calling the `TO_ARRAY()` function for the value, which for example returned an
array with a single value for boolean, numeric and string input values, and an array
with the object's values for an object input value. This behavior was inconsistent
with how the expansion operator works for the array indexes in 2.8, so the behavior
is now unified:
- if the left-hand side operand of `[*]` is an array, the array will be returned as
is when calling `[*]` on it
- if the left-hand side operand of `[*]` is not an array, an empty array will be
returned by `[*]`
AQL queries that rely on the old behavior can be changed by either calling `TO_ARRAY`
explicitly or by using the `[*]` at the correct position.
The following example query will change its result in 2.8 compared to 2.7:
LET values = "foo" RETURN values[*]
In 2.7 the query has returned the array `[ "foo" ]`, but in 2.8 it will return an
empty array `[ ]`. To make it return the array `[ "foo" ]` again, an explicit
`TO_ARRAY` function call is needed in 2.8 (which in this case allows the removal
of the `[*]` operator altogether). This also works in 2.7:
LET values = "foo" RETURN TO_ARRAY(values)
Another example:
LET values = [ { name: "foo" }, { name: "bar" } ]
RETURN values[*].name[*]
The above returned `[ [ "foo" ], [ "bar" ] ] in 2.7. In 2.8 it will return
`[ [ ], [ ] ]`, because the value of `name` is not an array. To change the results
to the 2.7 style, the query can be changed to
LET values = [ { name: "foo" }, { name: "bar" } ]
RETURN values[* RETURN TO_ARRAY(CURRENT.name)]
The above also works in 2.7.
The following types of queries won't change:
LET values = [ 1, 2, 3 ] RETURN values[*]
LET values = [ { name: "foo" }, { name: "bar" } ] RETURN values[*].name
LET values = [ { names: [ "foo", "bar" ] }, { names: [ "baz" ] } ] RETURN values[*].names[*]
LET values = [ { names: [ "foo", "bar" ] }, { names: [ "baz" ] } ] RETURN values[*].names[**]
* slightly adjusted V8 garbage collection strategy so that collection eventually
happens in all contexts that hold V8 external references to documents and
collections.
also adjusted default value of `--javascript.gc-frequency` from 10 seconds to
15 seconds, as less internal operations are carried out in JavaScript.
* fixes for AQL optimizer and traversal
* added `--create-collection-type` option to arangoimp
This allows specifying the type of the collection to be created when
`--create-collection` is set to `true`.
v2.8.0-beta2 (2015-12-16)
-------------------------
* added AQL query optimizer rule "sort-in-values"
This rule pre-sorts the right-hand side operand of the `IN` and `NOT IN`
operators so the operation can use a binary search with logarithmic complexity
instead of a linear search. The rule is applied when the right-hand side
operand of an `IN` or `NOT IN` operator in a filter condition is a variable that
is defined in a different loop/scope than the operator itself. Additionally,
the filter condition must consist of solely the `IN` or `NOT IN` operation
in order to avoid any side-effects.
* changed collection status terminology in web interface for collections for
which an unload request has been issued from `in the process of being unloaded`
to `will be unloaded`.
* unloading a collection via the web interface will now trigger garbage collection
in all v8 contexts and force a WAL flush. This increases the chances of perfoming
the unload faster.
* added the following attributes to the result of `collection.figures()` and the
corresponding HTTP API at `PUT /_api/collection/<name>/figures`:
- `documentReferences`: The number of references to documents in datafiles
that JavaScript code currently holds. This information can be used for
debugging compaction and unload issues.
- `waitingFor`: An optional string value that contains information about
which object type is at the head of the collection's cleanup queue. This
information can be used for debugging compaction and unload issues.
- `compactionStatus.time`: The point in time the compaction for the collection
was last executed. This information can be used for debugging compaction
issues.
- `compactionStatus.message`: The action that was performed when the compaction
was last run for the collection. This information can be used for debugging
compaction issues.
Note: `waitingFor` and `compactionStatus` may be empty when called on a coordinator
in a cluster.
* the compaction will now provide queryable status info that can be used to track
its progress. The compaction status is displayed in the web interface, too.
* better error reporting for arangodump and arangorestore
* arangodump will now fail by default when trying to dump edges that
refer to already dropped collections. This can be circumvented by
specifying the option `--force true` when invoking arangodump
* fixed cluster upgrade procedure
* the AQL functions `NEAR` and `WITHIN` now have stricter validations
for their input parameters `limit`, `radius` and `distance`. They may now throw
exceptions when invalid parameters are passed that may have not led
to exceptions in previous versions.
* deprecation warnings now log stack traces
* Foxx: improved backwards compatibility with 2.5 and 2.6
- reverted Model and Repository back to non-ES6 "classes" because of
compatibility issues when using the extend method with a constructor
- removed deprecation warnings for extend and controller.del
- restored deprecated method Model.toJSONSchema
- restored deprecated `type`, `jwt` and `sessionStorageApp` options
in Controller#activateSessions
v2.8.0-beta1 (2015-12-06)
-------------------------
* added AQL function `IS_DATESTRING(value)`
Returns true if *value* is a string that can be used in a date function.
This includes partial dates such as *2015* or *2015-10* and strings containing
invalid dates such as *2015-02-31*. The function will return false for all
non-string values, even if some of them may be usable in date functions.
v2.8.0-alpha1 (2015-12-03)
--------------------------
* added AQL keywords `GRAPH`, `OUTBOUND`, `INBOUND` and `ANY` for use in graph
traversals, reserved AQL keyword `ALL` for future use
Usage of these keywords as collection names, variable names or attribute names
in AQL queries will not be possible without quoting. For example, the following
AQL query will still work as it uses a quoted collection name and a quoted
attribute name:
FOR doc IN `OUTBOUND`
RETURN doc.`any`
* issue #1593: added AQL `POW` function for exponentation
* added cluster execution site info in explain output for AQL queries
* replication improvements:
- added `autoResync` configuration parameter for continuous replication.
When set to `true`, a replication slave will automatically trigger a full data
re-synchronization with the master when the master cannot provide the log data
the slave had asked for. Note that `autoResync` will only work when the option
`requireFromPresent` is also set to `true` for the continuous replication, or
when the continuous syncer is started and detects that no start tick is present.
Automatic re-synchronization may transfer a lot of data from the master to the
slave and may be expensive. It is therefore turned off by default.
When turned off, the slave will never perform an automatic re-synchronization
with the master.
- added `idleMinWaitTime` and `idleMaxWaitTime` configuration parameters for
continuous replication.
These parameters can be used to control the minimum and maximum wait time the
slave will (intentionally) idle and not poll for master log changes in case the
master had sent the full logs already.
The `idleMaxWaitTime` value will only be used when `adapativePolling` is set
to `true`. When `adaptivePolling` is disable, only `idleMinWaitTime` will be
used as a constant time span in which the slave will not poll the master for
further changes. The default values are 0.5 seconds for `idleMinWaitTime` and
2.5 seconds for `idleMaxWaitTime`, which correspond to the hard-coded values
used in previous versions of ArangoDB.
- added `initialSyncMaxWaitTime` configuration parameter for initial and continuous
replication
This option controls the maximum wait time (in seconds) that the initial
synchronization will wait for a response from the master when fetching initial
collection data. If no response is received within this time period, the initial
synchronization will give up and fail. This option is also relevant for
continuous replication in case *autoResync* is set to *true*, as then the
continuous replication may trigger a full data re-synchronization in case
the master cannot the log data the slave had asked for.
- HTTP requests sent from the slave to the master during initial synchronization
will now be retried if they fail with connection problems.
- the initial synchronization now logs its progress so it can be queried using
the regular replication status check APIs.
- added `async` attribute for `sync` and `syncCollection` operations called from
the ArangoShell. Setthing this attribute to `true` will make the synchronization
job on the server go into the background, so that the shell does not block. The
status of the started asynchronous synchronization job can be queried from the
ArangoShell like this:
/* starts initial synchronization */
var replication = require("@arangodb/replication");
var id = replication.sync({
endpoint: "tcp://master.domain.org:8529",
username: "myuser",
password: "mypasswd",
async: true
});
/* now query the id of the returned async job and print the status */
print(replication.getSyncResult(id));
The result of `getSyncResult()` will be `false` while the server-side job
has not completed, and different to `false` if it has completed. When it has
completed, all job result details will be returned by the call to `getSyncResult()`.
* fixed non-deterministic query results in some cluster queries
* fixed issue #1589
* return HTTP status code 410 (gone) instead of HTTP 408 (request timeout) for
server-side operations that are canceled / killed. Sending 410 instead of 408
prevents clients from re-starting the same (canceled) operation. Google Chrome
for example sends the HTTP request again in case it is responded with an HTTP
408, and this is exactly the opposite of the desired behavior when an operation
is canceled / killed by the user.
* web interface: queries in AQL editor now cancelable
* web interface: dashboard - added replication information
* web interface: AQL editor now supports bind parameters
* added startup option `--server.hide-product-header` to make the server not send
the HTTP response header `"Server: ArangoDB"` in its HTTP responses. By default,
the option is turned off so the header is still sent as usual.
* added new AQL function `UNSET_RECURSIVE` to recursively unset attritutes from
objects/documents
* switched command-line editor in ArangoShell and arangod to linenoise-ng
* added automatic deadlock detection for transactions
In case a deadlock is detected, a multi-collection operation may be rolled back
automatically and fail with error 29 (`deadlock detected`). Client code for
operations containing more than one collection should be aware of this potential
error and handle it accordingly, either by giving up or retrying the transaction.
* Added C++ implementations for the AQL arithmetic operations and the following
AQL functions:
- ABS
- APPEND
- COLLECTIONS
- CURRENT_DATABASE
- DOCUMENT
- EDGES
- FIRST
- FIRST_DOCUMENT
- FIRST_LIST
- FLATTEN
- FLOOR
- FULLTEXT
- LAST
- MEDIAN
- MERGE_RECURSIVE
- MINUS
- NEAR
- NOT_NULL
- NTH
- PARSE_IDENTIFIER
- PERCENTILE
- POP
- POSITION
- PUSH
- RAND
- RANGE
- REMOVE_NTH
- REMOVE_VALUE
- REMOVE_VALUES
- ROUND
- SHIFT
- SQRT
- STDDEV_POPULATION
- STDDEV_SAMPLE
- UNSHIFT
- VARIANCE_POPULATION
- VARIANCE_SAMPLE
- WITHIN
- ZIP
* improved performance of skipping over many documents in an AQL query when no
indexes and no filters are used, e.g.
FOR doc IN collection
LIMIT 1000000, 10
RETURN doc
* Added array indexes
Hash indexes and skiplist indexes can now optionally be defined for array values
so they index individual array members.
To define an index for array values, the attribute name is extended with the
expansion operator `[*]` in the index definition:
arangosh> db.colName.ensureHashIndex("tags[*]");
When given the following document
{ tags: [ "AQL", "ArangoDB", "Index" ] }
the index will now contain the individual values `"AQL"`, `"ArangoDB"` and `"Index"`.
Now the index can be used for finding all documents having `"ArangoDB"` somewhere in their
tags array using the following AQL query:
FOR doc IN colName
FILTER "ArangoDB" IN doc.tags[*]
RETURN doc
* rewrote AQL query optimizer rule `use-index-range` and renamed it to `use-indexes`.
The name change affects rule names in the optimizer's output.
* rewrote AQL execution node `IndexRangeNode` and renamed it to `IndexNode`. The name
change affects node names in the optimizer's explain output.
* added convenience function `db._explain(query)` for human-readable explanation
of AQL queries
* module resolution as used by `require` now behaves more like in node.js
* the `org/arangodb/request` module now returns response bodies for error responses
by default. The old behaviour of not returning bodies for error responses can be
re-enabled by explicitly setting the option `returnBodyOnError` to `false` (#1437)
v2.7.6 (2016-01-30)
-------------------
* detect more types of transaction deadlocks early
v2.7.5 (2016-01-22)
-------------------
* backported added automatic deadlock detection for transactions
In case a deadlock is detected, a multi-collection operation may be rolled back
automatically and fail with error 29 (`deadlock detected`). Client code for
operations containing more than one collection should be aware of this potential
error and handle it accordingly, either by giving up or retrying the transaction.
* improved internal datafile statistics for compaction and compaction triggering
conditions, preventing excessive growth of collection datafiles under some
workloads. This should also fix issue #1596.
* Foxx export cache should no longer break if a broken app is loaded in the
web admin interface.
* Foxx: removed some incorrect deprecation warnings.
* Foxx: mocha test paths with wildcard characters (asterisks) now work on Windows
v2.7.4 (2015-12-21)
-------------------
* slightly adjusted V8 garbage collection strategy so that collection eventually
happens in all contexts that hold V8 external references to documents and
collections.
* added the following attributes to the result of `collection.figures()` and the
corresponding HTTP API at `PUT /_api/collection/<name>/figures`:
- `documentReferences`: The number of references to documents in datafiles
that JavaScript code currently holds. This information can be used for
debugging compaction and unload issues.
- `waitingFor`: An optional string value that contains information about
which object type is at the head of the collection's cleanup queue. This
information can be used for debugging compaction and unload issues.
- `compactionStatus.time`: The point in time the compaction for the collection
was last executed. This information can be used for debugging compaction
issues.
- `compactionStatus.message`: The action that was performed when the compaction
was last run for the collection. This information can be used for debugging
compaction issues.
Note: `waitingFor` and `compactionStatus` may be empty when called on a coordinator
in a cluster.
* the compaction will now provide queryable status info that can be used to track
its progress. The compaction status is displayed in the web interface, too.
v2.7.3 (2015-12-17)
-------------------
* fixed some replication value conversion issues when replication applier properties
were set via ArangoShell
* fixed disappearing of documents for collections transferred via `sync` or
`syncCollection` if the collection was dropped right before synchronization
and drop and (re-)create collection markers were located in the same WAL file
* fixed an issue where overwriting the system sessions collection would break
the web interface when authentication is enabled
v2.7.2 (2015-12-01)
-------------------
* replication improvements:
- added `autoResync` configuration parameter for continuous replication.
When set to `true`, a replication slave will automatically trigger a full data
re-synchronization with the master when the master cannot provide the log data
the slave had asked for. Note that `autoResync` will only work when the option
`requireFromPresent` is also set to `true` for the continuous replication, or
when the continuous syncer is started and detects that no start tick is present.
Automatic re-synchronization may transfer a lot of data from the master to the
slave and may be expensive. It is therefore turned off by default.
When turned off, the slave will never perform an automatic re-synchronization
with the master.
- added `idleMinWaitTime` and `idleMaxWaitTime` configuration parameters for
continuous replication.
These parameters can be used to control the minimum and maximum wait time the
slave will (intentionally) idle and not poll for master log changes in case the
master had sent the full logs already.
The `idleMaxWaitTime` value will only be used when `adapativePolling` is set
to `true`. When `adaptivePolling` is disable, only `idleMinWaitTime` will be
used as a constant time span in which the slave will not poll the master for
further changes. The default values are 0.5 seconds for `idleMinWaitTime` and
2.5 seconds for `idleMaxWaitTime`, which correspond to the hard-coded values
used in previous versions of ArangoDB.
- added `initialSyncMaxWaitTime` configuration parameter for initial and continuous
replication
This option controls the maximum wait time (in seconds) that the initial
synchronization will wait for a response from the master when fetching initial
collection data. If no response is received within this time period, the initial
synchronization will give up and fail. This option is also relevant for
continuous replication in case *autoResync* is set to *true*, as then the
continuous replication may trigger a full data re-synchronization in case
the master cannot the log data the slave had asked for.
- HTTP requests sent from the slave to the master during initial synchronization
will now be retried if they fail with connection problems.
- the initial synchronization now logs its progress so it can be queried using
the regular replication status check APIs.
* fixed non-deterministic query results in some cluster queries
* added missing lock instruction for primary index in compactor size calculation
* fixed issue #1589
* fixed issue #1583
* fixed undefined behavior when accessing the top level of a document with the `[*]`
operator
* fixed potentially invalid pointer access in shaper when the currently accessed
document got re-located by the WAL collector at the very same time
* Foxx: optional configuration options no longer log validation errors when assigned
empty values (#1495)
* Foxx: constructors provided to Repository and Model sub-classes via extend are
now correctly called (#1592)
v2.7.1 (2015-11-07)
-------------------
* switch to linenoise next generation
* exclude `_apps` collection from replication
The slave has its own `_apps` collection which it populates on server start.
When replicating data from the master to the slave, the data from the master may
clash with the slave's own data in the `_apps` collection. Excluding the `_apps`
collection from replication avoids this.
* disable replication appliers when starting in modes `--upgrade`, `--no-server`
and `--check-upgrade`
* more detailed output in arango-dfdb
* fixed "no start tick" issue in replication applier
This error could occur after restarting a slave server after a shutdown
when no data was ever transferred from the master to the slave via the
continuous replication
* fixed problem during SSL client connection abort that led to scheduler thread
staying at 100% CPU saturation
* fixed potential segfault in AQL `NEIGHBORS` function implementation when C++ function
variant was used and collection names were passed as strings
* removed duplicate target for some frontend JavaScript files from the Makefile
* make AQL function `MERGE()` work on a single array parameter, too.
This allows combining the attributes of multiple objects from an array into
a single object, e.g.
RETURN MERGE([
{ foo: 'bar' },
{ quux: 'quetzalcoatl', ruled: true },
{ bar: 'baz', foo: 'done' }
])
will now return:
{
"foo": "done",
"quux": "quetzalcoatl",
"ruled": true,
"bar": "baz"
}
* fixed potential deadlock in collection status changing on Windows
* fixed hard-coded `incremental` parameter in shell implementation of
`syncCollection` function in replication module
* fix for GCC5: added check for '-stdlib' option
v2.7.0 (2015-10-09)
-------------------
* fixed request statistics aggregation
When arangod was started in supervisor mode, the request statistics always showed
0 requests, as the statistics aggregation thread did not run then.
* read server configuration files before dropping privileges. this ensures that
the SSL keyfile specified in the configuration can be read with the server's start
privileges (i.e. root when using a standard ArangoDB package).
* fixed replication with a 2.6 replication configuration and issues with a 2.6 master
* raised default value of `--server.descriptors-minimum` to 1024
* allow Foxx apps to be installed underneath URL path `/_open/`, so they can be
(intentionally) accessed without authentication.
* added *allowImplicit* sub-attribute in collections declaration of transactions.
The *allowImplicit* attributes allows making transactions fail should they
read-access a collection that was not explicitly declared in the *collections*
array of the transaction.
* added "special" password ARANGODB_DEFAULT_ROOT_PASSWORD. If you pass
ARANGODB_DEFAULT_ROOT_PASSWORD as password, it will read the password
from the environment variable ARANGODB_DEFAULT_ROOT_PASSWORD
v2.7.0-rc2 (2015-09-22)
-----------------------
* fix over-eager datafile compaction
This should reduce the need to compact directly after loading a collection when a
collection datafile contained many insertions and updates for the same documents. It
should also prevent from re-compacting already merged datafiles in case not many
changes were made. Compaction will also make fewer index lookups than before.
* added `syncCollection()` function in module `org/arangodb/replication`
This allows synchronizing the data of a single collection from a master to a slave
server. Synchronization can either restore the whole collection by transferring all
documents from the master to the slave, or incrementally by only transferring documents
that differ. This is done by partitioning the collection's entire key space into smaller
chunks and comparing the data chunk-wise between master and slave. Only chunks that are
different will be re-transferred.
The `syncCollection()` function can be used as follows:
require("org/arangodb/replication").syncCollection(collectionName, options);
e.g.
require("org/arangodb/replication").syncCollection("myCollection", {
endpoint: "tcp://127.0.0.1:8529", /* master */
username: "root", /* username for master */
password: "secret", /* password for master */
incremental: true /* use incremental mode */
});
* additionally allow the following characters in document keys:
`(` `)` `+` `,` `=` `;` `$` `!` `*` `'` `%`
v2.7.0-rc1 (2015-09-17)
-----------------------
* removed undocumented server-side-only collection functions:
* collection.OFFSET()
* collection.NTH()
* collection.NTH2()
* collection.NTH3()
* upgraded Swagger to version 2.0 for the Documentation
This gives the user better prepared test request structures.
More conversions will follow so finally client libraries can be auto-generated.
* added extra AQL functions for date and time calculation and manipulation.
These functions were contributed by GitHub users @CoDEmanX and @friday.
A big thanks for their work!
The following extra date functions are available from 2.7 on:
* `DATE_DAYOFYEAR(date)`: Returns the day of year number of *date*.
The return values range from 1 to 365, or 366 in a leap year respectively.
* `DATE_ISOWEEK(date)`: Returns the ISO week date of *date*.
The return values range from 1 to 53. Monday is considered the first day of the week.
There are no fractional weeks, thus the last days in December may belong to the first
week of the next year, and the first days in January may be part of the previous year's
last week.
* `DATE_LEAPYEAR(date)`: Returns whether the year of *date* is a leap year.
* `DATE_QUARTER(date)`: Returns the quarter of the given date (1-based):
* 1: January, February, March
* 2: April, May, June
* 3: July, August, September
* 4: October, November, December
- *DATE_DAYS_IN_MONTH(date)*: Returns the number of days in *date*'s month (28..31).
* `DATE_ADD(date, amount, unit)`: Adds *amount* given in *unit* to *date* and
returns the calculated date.
*unit* can be either of the following to specify the time unit to add or
subtract (case-insensitive):
- y, year, years
- m, month, months
- w, week, weeks
- d, day, days
- h, hour, hours
- i, minute, minutes
- s, second, seconds
- f, millisecond, milliseconds