Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 03:52
    yaozhong-OMEC closed #1486
  • 03:28
    nightroman opened #1496
  • 03:28
    nightroman labeled #1496
  • 00:32
    denileo82 labeled #1495
  • 00:32
    denileo82 opened #1495
  • Feb 20 21:15
    mitja-p commented #1493
  • Feb 20 20:45
    mbdavid unlabeled #1494
  • Feb 20 20:42
    mbdavid commented #1493
  • Feb 20 20:39

    mbdavid on master

    Adding more examples for #1493 Merge branch 'master' of github… (compare)

  • Feb 20 20:37
    mbdavid labeled #1493
  • Feb 20 17:43
    mbdavid commented #1494
  • Feb 20 15:58
    gnimor edited #1494
  • Feb 20 15:58
    gnimor opened #1494
  • Feb 20 15:58
    gnimor labeled #1494
  • Feb 20 14:16
    mitja-p edited #1493
  • Feb 20 14:16
    mitja-p labeled #1493
  • Feb 20 14:16
    mitja-p opened #1493
  • Feb 20 13:41
    mbdavid unlabeled #1489
  • Feb 20 13:39
    mbdavid commented #1489
  • Feb 20 13:13
    mbdavid commented #1489
Tviljan
@Tviljan
Never mind I had a bug in my test :D Sorry about
Tviljan
@Tviljan
Could someone explain the CHECKPOINT pragma to me? I am not sure I understand it. It buffers writes before doing the actual writing?
Mauricio David
@mbdavid
CHECKPOINT is a command that copies all LOG datafile (-log file) into DATAFILE.
CHECKPOINT pragma set a limit in how many 8K pages -log file must have to execute CHECKPOINT. Default is 1000. So, when -log gets ~ 8Mb CHECKPOINT operation will be run
If set to 0, CHECKPOINT will never run
(must run manually)
Tviljan
@Tviljan
So if we want to close the database connection or shut down app we should now call checkpoint operation to write all log to db file. Do we really need to call checkpoint is checkpoint pragma is 0?
Tviljan
@Tviljan
*if
Tviljan
@Tviljan
My litecollection throws LiteDB.LiteException: Invalid CollectionPage buffer on 0
Somehow I can't replicate it on my machine but it fails test on TFS
Tviljan
@Tviljan
Not sure what was going on. There were lots of problems there, but one error was the liteexception and other was it was trying to open databasename-log file and it was used by another process
But I have checkpoint pragma 0.. is it still creating the files?
Leonardo Nascimento
@lbnascimento
if CHECKPOINT pragma is set to 0, auto checkpoint and checkpoint on shutdown are disabled. the log file will grow indefinitely and you'll have to manually call for a checkpoint in order to persist data from commited transactions to the datafile
Tviljan
@Tviljan
Ok so I really should not put it to 0?
theodorefromthechipmunks
@theodorefromthechipmunks
In order to use your liteDB studio tool, are we supposed to open up the repository from GitHub into VisalStudios? I can't get it to work
Swoorup Joshi
@Swoorup
Hi all, is there a API changelog of what has changed from 4 to 5? It appears that I can no longer build LiteDB.FSharp with LiteDb > 5
I am trying to see if I can do a migration
Tviljan
@Tviljan
Could you clarify the Checkpoint a bit? If I set it to 0 I have to manually call the checkpoint method that writes log to db? Is that like transaction?
What if I want to delete the db but I have multiple files?
It is not single file db anymore?
mbaletic
@mbaletic
hi
im getting Message "This operation is not supported for a relative URI." string
on Insert
Mauricio David
@mbdavid
Hi @mbaletic, can you open an issue in github with an code example to be tested?
@Tviljan, v5 implements new WAL (write ahead log) like all other databases (like mongodb, sql server or sqlite). WAL needs an adicional file, a -log file. This file, in LiteDB (and SQLite) are temporary and are deleted when database is closed.
Checkpoint is the process to copy from -log file to original datafile. This processes occurs automaticly when -log file gets 1000 pages (~8mb) or when close database. This number (1000) can be changed by PRAGMA called "CHECKPOINT".
If this pragma is set to 0 this checkpoint operation will no occurs automatic (not even when database is closed). To run checkpoint operation you need call CHECKPOINT method
You can read more about checkpoint in SQLite documentation (LiteDB use same conecpt) and all info about checkpoint is valid to LiteDB
Mauricio David
@mbdavid
Hi @Swoorup, I had no migration document, but v5 api is very compatible with v4 (ok, there is minor changes... like Connection String). Are you having any problem in your upgrade? Tell here or open an QUESTION issue in github....
Tviljan
@Tviljan
Does the checkpoint matter if my app keeps an open db connection instead of opening and closing connections on each request?
Maybe u need to return the checkpoint pragma but add checkpoint after each call
Tviljan
@Tviljan
Is it wise to add call to Checkpoint() after each insert/update?
enescaglar
@enescaglar
Hi guys, I am new to LiteDB and was wondering if there is any compression feature? What I need is to reduce the size of the database. As the values are kept as json, for each kv, keys are stored separately which increasing the overall size of the db. Keeping data as typed/untyped collection doesn't make any difference in terms of size.
by the way I am just trying to keep only text values, which consist of one PK (string) + 3 other string fields
andreasrain-swh
@andreasrain-swh

Hey there, I already went through the issues for LiteDB v5 and didn't really find anything.

We're using LiteDB v4.1.4 right now and seemingly have an issue when the process is stopped (for example when a power loss occurs).
In this version an error occurs we cannot recover from, not even using the recover script. While the database can be opened and read fully,
it does not have current data.

In the issues we found that v5 should fix that. However, we have concurrent reads and writes on the database. When using the db we now get unreasonable result.
The issue that FileStorage.Find() throws a NullReferenceException is also a problem.

Are there recommendations at the moment at how to operate with the new v5?

CSVKRAO
@CSVKRAO
Hi Everyone, I am new toLiteDB
I need to create an local db based application
is the LiteDB is good option for this?
as I need to include this in web service
Tviljan
@Tviljan
Hey I get NotSupportedException when running on Android
var _liteRepository = new LiteRepository(connectionString);

02-14 13:08:21.802 I/mono-stdout(10042): System.NotSupportedException: Specified method is not supported.System.NotSupportedException: Specified method is not > supported.

at System.Threading.Mutex..ctor (System.Boolean initiallyOwned, System.String name) [0x00006] in <19853c43ab794d18ab1a33ecb65b3c4d>:0
at (wrapper remoting-invoke-with-check) System.Threading.Mutex..ctor(bool,string)
at LiteDB.SharedEngine..ctor (LiteDB.Engine.EngineSettings settings) [0x0002b] in <34833dba578245fb97677ec10dc90e9a>:0
at LiteDB.ConnectionString.CreateEngine () [0x0004e] in <34833dba578245fb97677ec10dc90e9a>:0
at LiteDB.LiteDatabase..ctor (LiteDB.ConnectionString connectionString, LiteDB.BsonMapper mapper) [0x0002e] in <34833dba578245fb97677ec10dc90e9a>:0
at LiteDB.LiteDatabase..ctor (System.String connectionString, LiteDB.BsonMapper mapper) [0x00007] in <34833dba578245fb97677ec10dc90e9a>:0
at LiteDB.LiteRepository..ctor (System.String connectionString, LiteDB.BsonMapper mapper) [0x00006] in <34833dba578245fb97677ec10dc90e9a>:0

Ah reason was my connectionstring.. It was using connection=shared
Not compatible with android it seems
David Fowler
@davidfowl
Is there an EF provider?
Mauricio David
@mbdavid
Hi @davidfowl, there is no EF provider yet, only a syntax like MongoDB provider plus SQL syntax for query and manipulate
adospace
@adospace
Hi @mbdavid, is it possible to open a db version 4 using version 5 without set the upgrade connection property to true? i.e. I'm correct saying that upgrading from version 4 to 5 database itself is upgraded so that old version 4 can't access it anymore?
Mauricio David
@mbdavid
Hi @adospace, unfortunately no. v4 and v5 contains a complete different file format.
adospace
@adospace
ok, I'm going to release 2 different drivers for LinqPad 6 targeting V4 and V5 separately