profile
viewpoint
Rohan Vivek rohanvivek Tekenlight Solutions Pvt Ltd Durgapur, West Bengal rohanvivek.github.io My temple and the vision of Vivek.

rohanvivek/HTTPFormServer 1

A C++ program using POCO library (https://github.com/pocoproject/poco) which can be built HTML form on the local server having GET and POST method and we can also upload file to it.

rohanvivek/ATM-Emulator.py- 0

An atm machine which can take data as input from user and use exsisting data to verify and make trasaction in withdrawal deposit and balance view(with currency choice)..

rohanvivek/dg-python-assignment 0

Python practice programs

rohanvivek/FFmpeg 0

Mirror of git://source.ffmpeg.org/ffmpeg.git

issue closedneoxic/lua-mongo

Unable to install lua-mongo with luarocks

I'm getting an error when I try to install lua-mongo with luarocks.
image

Installing https://luarocks.org/lua-mongo-1.2.2-1.src.rock gcc -O2 -fPIC -I/usr/include/lua5.2 -c src/bson.c -o src/bson.o -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-1.0 In file included from src/bson.c:23: src/common.h:25:10: fatal error: lauxlib.h: No such file or directory #include <lauxlib.h> ^~~~~~~~~~~ compilation terminated.

I installed the mongo-c driver version 1.17.3 following these steps:
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.3/mongo-c-driver-1.17.3.tar.gz $ tar xzf mongo-c-driver-1.17.3.tar.gz $ cd mongo-c-driver-1.17.3 $ mkdir cmake-build $ cd cmake-build $ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. $ make $ sudo make install

closed time in 8 days

danwize

issue commentneoxic/lua-mongo

Unable to install lua-mongo with luarocks

You need Lua headers to install modules written in C via LuaRocks.

danwize

comment created time in 8 days

issue commentneoxic/lua-mongo

Unable to install lua-mongo with luarocks

I found this issue here that seemed to solve my problem. I had to install liblua5.2-dev accrding to this: https://github.com/ers35/luastatic/issues/18

danwize

comment created time in 8 days

issue openedneoxic/lua-mongo

Unable to install lua-mongo with luarocks

I'm getting an error when I try to install lua-mongo with luarocks.
image

I installed the mongo-c driver version 1.17.3 following these steps:
$ wget https://github.com/mongodb/mongo-c-driver/releases/download/1.17.3/mongo-c-driver-1.17.3.tar.gz $ tar xzf mongo-c-driver-1.17.3.tar.gz $ cd mongo-c-driver-1.17.3 $ mkdir cmake-build $ cd cmake-build $ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF .. $ make $ sudo make install

created time in 8 days

created repositorykushaldas/tumpa

created time in 24 days

startednanzhou/dominions5_manual_chinese

started time in a month

created repositorykushaldas/talktosc

created time in 2 months

issue commentneoxic/lua-mongo

Session support

Hi,

Sure, thanks. I'll see what I can do on my side, but I'll keep a close look on this.

gil-opplane

comment created time in 2 months

IssuesEvent

issue commentneoxic/lua-mongo

Session support

I'm in favour to leave this issue open to see if there's demand for this feature and it's worth implementing in the long run.

gil-opplane

comment created time in 2 months

issue closedneoxic/lua-mongo

Session support

Hey,

I've been looking at the code you implemented and, first of all, thanks for all the work. Now, I have a task at hand where I need to use a transaction to create multiple collections and commit or abort depending on the jobs' success. This should be available on the latest mongo version (4.4), so I went searching for the class in your code where the notion of transaction or session was implemented. Unfortunately, I didn't find them.

Am I missing something? Or, if not, are you planning on implementing these notions soon?

Here's the documentation I've been looking at:

Thanks in advance.

closed time in 2 months

gil-opplane

issue commentneoxic/lua-mongo

Session support

Hi,

I'll look into the :command() method. I'm already using it in other parts with other tasks, I was just looking whether there was an easier way to do this through a direct method. Thanks nonetheless.

gil-opplane

comment created time in 2 months

issue commentneoxic/lua-mongo

Session support

First, I'll answer your questions directly:

  1. No, there's no direct support for client sessions in lua-mongo;
  2. No, there are no plans to implement this API along with other rarely used features.

Now, on a positive note, Mongo C Driver like all other MongoDB drivers/clients is just a wrapper around MongoDB's wire protocol. The protocol of MongoDB is essentially BSON objects going back and forth. A driver provides some basic functionality that helps the user to avoid constructing commands and parsing responses themselves. Please note that different drivers have a different level of abstraction dealing with this task. For example, the PHP driver handles most high level abstractions like instances, objects, sessions, etc itself without relying on the underlying C driver (mongo-c-driver).

gil-opplane

comment created time in 2 months

issue openedneoxic/lua-mongo

Session support

Hey,

I've been looking at the code you implemented and, first of all, thanks for all the work. Now, I have a task at hand where I need to use a transaction to create multiple collections and commit or abort depending on the jobs' success. This should be available on the latest mongo version (4.4), so I went searching for the class in your code where the notion of transaction or session was implemented. Unfortunately, I didn't find them.

Am I missing something? Or, if not, are you planning on implementing these notions soon?

Here's the documentation I've been looking at:

Thanks in advance.

created time in 2 months

push eventneoxic/lua-mongo

neoxic

commit sha b14f75bad446af637125fdaf826843c610501bc8

Fix 51d27621 Cosmetics

view details

push time in 2 months

push eventneoxic/lua-mongo

neoxic

commit sha 51d27621f4f9dbbf0be77af9a95fec95c5c207af

Add note

view details

push time in 2 months

startedvnmakarov/mir

started time in 2 months

issue closedneoxic/lua-mongo

Process aborts due to a zero server_id

Make sure that you actually have database TestDatabase with collection TestCollection which contains 101+ documents:

local mongo = require 'mongo'
local client = mongo.Client('mongodb://127.0.0.1')
local cmd = {find = "TestCollection"}
local cursor = client:command("TestDatabase", cmd)
return type(cursor)

The process will abort due to failed assertion BSON_ASSERT (server_id); inside mongoc_cluster_stream_for_server() in mongoc-cluster.c: mongoc_cluster_stream_for_server(): precondition failed: server_id

This seems to happen only if the data of firstBatch isn't fully consumed:

local count = 0
for _ in cursor:iterator() do
	count = count + 1
	if count == 102 then break end -- any value smaller than 102 will abort
end
return count

lua-mongo: v1.2.0 mongo-c-driver: v1.15.1

closed time in 2 months

mokhadri

issue commentneoxic/lua-mongo

Process aborts due to a zero server_id

This looks like an issue with Mongo C Driver itself to me since the triggered assertion is internal. I can also see that you use mongo-c-driver 1.15. Try to upgrade before reporting upstream.

mokhadri

comment created time in 2 months

issue openedneoxic/lua-mongo

Process aborts due to a zero server_id

Make sure that you actually have database TestDatabase with collection TestCollection which contains 101+ documents:

local mongo = require 'mongo'
local client = mongo.Client('mongodb://127.0.0.1')
local cmd = {find = "TestCollection"}
local cursor = client:command("TestDatabase", cmd)
return type(cursor)

The process will abort due to failed assertion BSON_ASSERT (server_id); inside mongoc_cluster_stream_for_server() in mongoc-cluster.c: mongoc_cluster_stream_for_server(): precondition failed: server_id

This seems to happen only if the data of firstBatch isn't fully consumed:

local count = 0
for _ in cursor:iterator() do
	count = count + 1
	if count == 102 then break end -- any value smaller than 102 will abort
end
return count

lua-mongo: v1.2.0 mongo-c-driver: v1.15.1

created time in 2 months

fork aleks-f/macchina.io

macchina.io IoT Edge Device SDK is a powerful C++ and JavaScript SDK for edge devices, IoT gateways and connected embedded systems.

https://macchina.io

fork in 3 months

push eventneoxic/lua-mongo

neoxic

commit sha 0eac81907cbf3302fd0078c63ec25a32ae1fa811

Secure metatables (again)

view details

push time in 3 months

startedneomutt/neomutt

started time in 3 months

push eventneoxic/lua-mongo

neoxic

commit sha 7e8c13973358590a27e5810ab492e7316fbb8881

Brush up public/private decls Use fixed literal for luaL_register()

view details

push time in 3 months

push eventneoxic/lua-mongo

neoxic

commit sha 0deb7c16b9fe53eeff0413feedbbfdb423e4884d

Secure metatables

view details

neoxic

commit sha 2ad83da7fe97045fe70bb433c04dad1eb97c4bf1

Cosmetics

view details

push time in 3 months

issue closedneoxic/lua-mongo

i have problem guy.how to find or aggregation ISODate.

i try. in mongo db {"start_time" : ISODate("2020-09-18T17:57:20Z"),"exp_time" : ISODate("2021-09-07T17:57:20Z")} how to find or aggregation time with gte or lte i use query in mongo shell it work . db.collection.find({ "start_time" : { "$lte": ISODate("2020-09-18T17:57:20Z")} })

how to find isodate in your lib

thank you.

closed time in 3 months

tomanupong
more