aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mnesia/doc/src/notes.xml
blob: f0df38a46cb019a6dd678068e2512f3b66cb18fd (plain) (blame)
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
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>1996</year><year>2012</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.

      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.

    </legalnotice>

    <title>Mnesia Release Notes</title>
    <prepared>Dan Gudmundsson and H&aring;kan Mattsson</prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date>05-01-26</date>
    <rev>AE</rev>
    <file>notes.xml</file>
  </header>
  <p>This document describes the changes made to the Mnesia system
    from version to version.  The intention of this document is to
    list all incompatibilities as well as all enhancements and
    bugfixes for every release of Mnesia. Each release of Mnesia
    thus constitutes one section in this document. The title of each
    section is the version number of Mnesia.</p>

  <section><title>Mnesia 4.7</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Returns the same value for
	    mnesia_loader:disc_load_table/2 as
	    mnesia_loader:net_load_table/4 if a table copy can not be
	    found. (Thanks to Uwe Dauernheim)</p>
          <p>
	    Own Id: OTP-10015</p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Improved table lock algorithm.</p>
          <p>
	    Own Id: OTP-9890</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.6</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Reduce calls to phash in key_to_frag_number</p>
          <p>
	    Original code calls phash 1..2 times, based on which
	    fragment the hashed key targets and how many fragments
	    exist. New code always calls phash only once.</p>
          <p>
	    Add mnesia_frag_hash test (Thanks to Philip Robinson)</p>
          <p>
	    Own Id: OTP-9722</p>
        </item>
        <item>
          <p>
	    Fixed a sticky lock bug which caused mnesia:read(Tab,
	    Key, write) return undefined.</p>
          <p>
	    Own Id: OTP-9786</p>
        </item>
        <item>
          <p>
	    Use the synchronous log_terms instead of alog_terms in
	    mnesia_log:ets2dcd()</p>
          <p>
	    This avoids the situation where mnesia could dump a very
	    large ets table in its entirety into the message queue of
	    the disk_log process, causing memory blowup and choking
	    the disk logger. (Thanks to Richard Carlsson)</p>
          <p>
	    Own Id: OTP-9804</p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Implemented a new option to mnesia:create_table/2 which
	    allows the user to assign 'ets' and 'dets' options not
	    available in mnesia.</p>
          <p>
	    Own Id: OTP-8970</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.5.1</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Fix deadlock in mnesia:del_table_copy/2.</p>
          <p>
	    Own Id: OTP-9689 Aux Id: seq11927 </p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Allow schema operations when using different mnesia
	    versions.</p>
          <p>
	    Own Id: OTP-9657 Aux Id: seq11926 </p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.5</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Fix protocol issues. Mnesia-4.4.19 could not communicate
	    with to older nodes.</p>
          <p>
	    Own Id: OTP-9473</p>
        </item>
        <item>
	    <p> XML files have been corrected. </p>
          <p>
	    Own Id: OTP-9550 Aux Id: OTP-9541 </p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Dump the log even if no transactions have been invoked on
	    local node, otherwise the log will grow forever with
	    decisions from the other nodes who have tables on disk.
	    Thanks Marek Majkowski.</p>
          <p>
	    Own Id: OTP-9551</p>
        </item>
        <item>
          <p>
	    Use dedicated api for clear_table, i.e. instead of
	    match_delete use delete_all_objects. Thanks KukHyun Lee.</p>
          <p>
	    Own Id: OTP-9558</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.19</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Mnesia could crash if mnesia:add_table_index/2 was
	    invoked before the table was loaded on all nodes.</p>
          <p>
	    Own Id: OTP-9285 Aux Id: seq11844 </p>
        </item>
        <item>
          <p>
	    Add {majority, boolean()} per-table option.</p>
          <p>
	    With {majority, true} set for a table, write transactions
	    will abort if they cannot commit to a majority of the
	    nodes that have a copy of the table. Currently, the
	    implementation hooks into the prepare_commit, and forces
	    an asymmetric transaction if the commit set affects any
	    table with the majority flag set. In the commit itself,
	    the transaction will abort if it cannot satisfy the
	    majority requirement for all tables involved in the
	    transaction.(Thanks to Ulf Wiger)</p>
          <p>
	    Own Id: OTP-9304</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.18</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Call chmod without the "-f" flag</p>
          <p>
	    "-f" is a non-standard chmod option which at least SGI
	    IRIX and HP UX do not support. As the only effect of the
	    "-f" flag is to suppress warning messages, it can be
	    safely omitted. (Thanks to Holger Wei�)</p>
          <p>
	    Own Id: OTP-9170</p>
        </item>
        <item>
          <p>
	    Mnesia sometimes failed to update meta-information in
	    large systems, which could cause table content to be
	    inconsistent between nodes.</p>
          <p>
	    Own Id: OTP-9186 Aux Id: seq11728 </p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.17</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Calling mnesia:first/1 on empty fragmented table works.
	    Thanks Magnus Henoch.</p>
          <p>
	    Own Id: OTP-9108</p>
        </item>
        <item>
          <p>
	    If Mnesia detects that the network is not fully connected
	    during start, Mnesia will not start until all nodes are
	    reachable.</p>
          <p>
	    Own Id: OTP-9115 Aux Id: seq-11728 </p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Fix issues reported by dialyzer.</p>
          <p>
	    Own Id: OTP-9107</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.16</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
	    Sometimes a 'log_header' record was added to tables when
	    invoking mnesia:restore/2 with the option
	    'recreate_tables'. Thanks Vance Shipley.</p>
          <p>
	    Own Id: OTP-8960</p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Compiler warnings were eliminated.</p>
          <p>
	    Own Id: OTP-8855</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.15</title>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    Eliminated warnings for auto-imported BIF clashes.</p>
          <p>
	    Own Id: OTP-8840</p>
        </item>
      </list>
    </section>

</section>

<section><title>Mnesia 4.4.14</title>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Added mnesia:subscribe(activity) contributed by Bernard
            Duggan.</p>
          <p>
            Own Id: OTP-8519</p>
        </item>
      </list>
    </section>
    
  </section>  
  
  <section><title>Mnesia 4.4.13</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Transactions could be left hanging if a node went down
            when invoking mnesia:sync_transaction/[1,2]. Thanks Igor
            Ribeiro Sucupira.</p>
          <p>
            Own Id: OTP-8402</p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Igor Ribeiro Sucupira added the option to compress data
            when copying tables between Mnesia nodes.</p>
          <p>
            Own Id: OTP-8406</p>
        </item>
      </list>
    </section>

  </section>
  <section><title>Mnesia 4.4.12</title>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            The documentation is now built with open source tools
            (xsltproc and fop) that exists on most platforms. One
            visible change is that the frames are removed.</p>
          <p>
            Own Id: OTP-8250</p>
        </item>
      </list>
    </section>

  </section>
  <section><title>Mnesia 4.4.11</title>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Fixed duplicate results with mnesia:index_read() on
            ordered_set tables. Reported by Sam Bobroff. </p>
	  <p>
	    Fixed locking in mnesia:index_read() which now grabs a read
            table lock to ensure correctness, this may slow down the
            operation or block other processes trying to reach the
            same table. </p>
	  <p>
	    Calling mnesia:dump_log() could crash mnesia,
            Reported by Igor Ribeiro Sucupira.</p>
          <p> Own Id: OTP-8074</p>
        </item>
      </list>
    </section>

  </section>
  <section><title>Mnesia 4.4.10</title>
    
    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Mnesia crashed if a qlc query was running inside a
            transaction when mnesia stopped at another node. Thanks
            Teemu Antti-Poika.</p>
          <p>
            Own Id: OTP-7968</p>
        </item>
        <item>
          <p>
            Mnesia could crash when loading local_content tables.</p>
          <p>
            Own Id: OTP-8002 Aux Id: seq11277 </p>
        </item>
      </list>
    </section>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Minor (smp) optimizations.</p>
          <p>
            Own Id: OTP-7928</p>
        </item>
      </list>
    </section>
    
  </section>


  <section><title>Mnesia 4.4.9</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            mnesia:clear_table/1 crashed instead of returning
            <c>{aborted,..}</c> if it was called inside a
            transaction.</p>
          <p>
            Own Id: OTP-7911</p>
        </item>
      </list>
    </section>
    
  </section>

  <section><title>Mnesia 4.4.8</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            With bad timing several api functions could return or
            exit with a bad error message when mnesia was shutting
            down.</p>
          <p>
            Own Id: OTP-7753 Aux Id: seq11179 </p>
        </item>
        <item>
          <p>
            <c>mnesia:clear_table/1</c> cleared all nodes table
            content even if the table was <c>local_content</c> only
            type.</p>
          <p>
            Own Id: OTP-7835</p>
        </item>
      </list>
    </section>
    
  </section>

 <section><title>Mnesia 4.4.7</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Disallowed match patterns ('_', and '$n') as argument to
            <c>mnesia:delete_object/1</c> and friends.</p>
          <p>
            Own Id: OTP-7524</p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Introduced a few new functions in Mnesia: <c>mnesia:read/2</c>,
            <c>mnesia:first/3</c>, <c>mnesia:last/3</c>, <c>mnesia:prev/4</c>,
            <c>mnesia:next/4</c>, <c>mnesia_frag:first/1</c>, <c>mnesia_frag:last/1</c>,
            <c>mnesia_frag:prev/2</c>, <c>mnesia_frag:next/2</c>.</p>
          <p>
            Own Id: OTP-7625</p>
        </item>
      </list>
    </section>

</section>

 <section><title>Mnesia 4.4.6</title>    
    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            <c>mnesia:restore/2</c> aborted if a <c>EXIT</c> message
            appeared in the client message queue.</p>
          <p>
            Own Id: OTP-7585 Aux Id: seq11046 </p>
        </item>
      </list>
    </section>
  </section>

  <section><title>Mnesia 4.4.5</title>
    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
	    mnesia:clear_table/1 does not require that all
            replicas of the table are available anymore.</p>
          <p>
            Own Id: OTP-7466 Aux Id: seq11015</p>
        </item>
      </list>
    </section>
  </section>

  <section><title>Mnesia 4.4.4</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Mnesia did not garbage collect transaction decisions on
            disk based nodes if no transactions where made on the
            local node.</p>
          <p>
            Own Id: OTP-7419</p>
        </item>
      </list>
    </section>

  </section>

  <section><title>Mnesia 4.4.3</title>

    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Table referred to by foreign key did not have node_pool
            properly cleaned up when a node was removed from the
            schema. Thanks Paul Mineiro.</p>
          <p>
            Own Id: OTP-7340</p>
        </item>
        <item>
          <p>
            Mnesia crashed and generated a core dump if a
            schema_transaction was running when mnesia stopped.</p>
          <p>
            Own Id: OTP-7378 Aux Id: seq10964 </p>
        </item>
      </list>
    </section>


    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            It is now possible to delete a db node even when other
            disk resident nodes are down. Thanks Paul Mineiro.</p>
          <p>
            Own Id: OTP-7383</p>
        </item>
      </list>
    </section>

</section>

  <section><title>Mnesia 4.4.2</title>
    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Sticky locks could lead to hanging transactions.</p>
          <p>
            Own Id: OTP-7205 Aux Id: seq10793 </p>
        </item>
        <item>
          <p>
            <c>mnesia:snmp_get_next_index/2</c> didn't work with
            partial index keys. Argument checking is now done
            according to documentation, in functions
            <c>mnesia:snmp_get_row/2</c>,
            <c>mnesia:snmp_get_mnesia_key/2</c> and
            <c>mnesia:snmp_get_next_index/2</c>. These functions now
            require that <c>RowIndex</c> is a list.</p>
          <p>
            *** POTENTIAL INCOMPATIBILITY ***</p>
          <p>
            Own Id: OTP-7208</p>
        </item>
      </list>
    </section>
  </section>

  <section><title>Mnesia 4.4.1</title>
    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Snmp index tables was not initialized correctly in
            <c>mnesia-4.4</c>.</p>
          <p>
            Own Id: OTP-7170 Aux Id: seq10870 </p>
        </item>
      </list>
    </section>
    <section><title>Known Bugs and Problems</title>
      <list>
        <item>
          <p>
            Rearranging fragmented tables is an O(N^2) operation.</p>
          <p>
            Own Id: OTP-6300</p>
        </item>
      </list>
    </section>
  </section>

  <section><title>Mnesia 4.4</title>
    <section><title>Fixed Bugs and Malfunctions</title>
      <list>
        <item>
          <p>
            Mnesia ignored the module argument to
            <c>mnesia:restore/2</c>. Thanks Paul Minerio.</p>
          <p>
            Own Id: OTP-6981</p>
        </item>
      </list>
    </section>

    <section><title>Improvements and New Features</title>
      <list>
        <item>
          <p>
            Mnesia's snmp operations <c>snmp_get_row/2</c>,
            <c>snmp_get_next_index/2</c> and
            <c>snmp_get_mnesia_key/2</c> have been made context
            aware, i.e. inside a transaction they will compensate for
            table updates made in earlier in the same transaction.
            This might cause a performance drop if a lot of updates
            have been made before the invocation of these functions.</p>
          <p>
            *** POTENTIAL INCOMPATIBILITY ***</p>
          <p>
            Own Id: OTP-6856 Aux Id: seq10671 </p>
        </item>
        <item>
          <p>
            Introduced erlang:phash/2 as new default for fragmented
            tables. Already existing tables will continue to use
            whatever hash function they where using.</p>
          <p>
            Own Id: OTP-6923</p>
        </item>
        <item>
          <p>
            Introduced <c>mnesia:is_transaction/0</c>.</p>
          <p>
            Own Id: OTP-6995 Aux Id: seq10812 </p>
        </item>
      </list>
    </section>

    <section><title>Known Bugs and Problems</title>
      <list>
        <item>
          <p>
            Rearranging fragmented tables is an O(N^2) operation.</p>
          <p>
            Own Id: OTP-6300</p>
        </item>
      </list>
    </section>
  </section>

  <!-- section>
    <title>Previous Notes</title>
    <p>For information about older versions see <url href="part_notes_history_frame.html">release notes history</url>.</p>
  </section -->
</chapter>