Git Product home page Git Product logo

indextank-service's People

Contributors

clamprecht avatar dbuthay avatar iladriano avatar santip avatar searchify avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indextank-service's Issues

Inclusive language

Can you address a couple of instances of language in the project where the wording can be made more inclusive? (example: whiltelist -> allowlist, master/slave -> leader/follower). We are trying to make the code in all LinkedIn projects more inclusive. Could you please examine whether or not these need to be updated, and make the changes? For suggested replacements see go/inclusivelanguage or google. THANK YOU!

Term URL
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/config_dbslave.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/create_dbslave.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storage/synchronize.sh
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/__init__.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/__init__.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/safe_reload.sh
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/dbsnapshot.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/dbsnapshot.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/dbinstance.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/dbinstance.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/sample-config/etc/service/indexengine-nebu-populator/run
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/sample-config/etc/service/indexengine-nebu-supervisor/run
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/README.md
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/templates/documentation/tutorial-autocomplete.html
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/templates/heroku-dashboard.html
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/demo_index/instruments.dat
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/nebu/inst.json
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/config_dbslave.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/create_dbslave.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storage/synchronize.sh
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/__init__.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/__init__.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/safe_reload.sh
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/dbsnapshot.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/dbsnapshot.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/api/boto/rds/dbinstance.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/boto/rds/dbinstance.py
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/sample-config/etc/service/indexengine-nebu-populator/run
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/sample-config/etc/service/indexengine-nebu-supervisor/run
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/README.md
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/templates/documentation/tutorial-autocomplete.html
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storefront/templates/heroku-dashboard.html
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/demo_index/instruments.dat
Master https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/nebu/inst.json
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/config_dbslave.py
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/create_dbslave.py
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storage/synchronize.sh
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/config_dbslave.py
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/backoffice/cloud/create_dbslave.py
Slave https://github.com/linkedin/indextank-service/blob/880c6295ce8e7a3a55bf9b3777cc35c7680e0d7e/storage/synchronize.sh

Missing views.py

In api/restapi.py line 10:
from views import mixpanel_event_track
But here is no such a file.

About storfront/get_started and api server

#url(r'^get-started/$', 'storefront.views.get_started', name='get_started'),
          <form id="signup">
            <div class="form_sec">
              <div class="input_bg">
                <label><span class="none">&nbsp;</span>
                <input type="text" emptyvalue="Email" class="empty" name="" id="email" />
                </label>
              </div>
              <label>
              <input type="submit" value="SIGN UP" class="signup"/>
              <span class="none">&nbsp;</span> </label>
              <div id="email_error"></div>
            </div>
          </form>
  if request.is_ajax() and request.method == 'POST':
  • It seem need AJAX, but I cant find any js file or js code will this AJAX request.
  • I am a web newbie, not familiar with Django. If I ask stupid question, sorry.
    Thanks for your reply.

ImportError: No module named indextank.client

It probably is just me but running (step 1 of the 'getting started' paragraph):

python manage.py syncdb

results in

ImportError: No module named indextank.client

This is reference in ./nebu/api_linked_models.py line 5.

api_key generation salt disclosed

I think your api_key generation salt should be within a config file. If ids get public, I think a bruteforce attack might be possible.

I didn't have time to study more the code, so I'm sorry if I got something wrong here.

indexing docid with non-ascii characters causes 503 error

Trying to index a doc whose docid contains a "high ascii" or Unicode character above 127 causes the following exception in restapi:

17669 05/02-00.50.12      RPC:ERRO Unexpected failure to run send_batch, reconnecting once @rpc.py:87
Traceback (most recent call last):
  File "../api/rpc.py", line 77, in wrap
    return att(*args, **kwargs)
  File "../gen-py/flaptor/indextank/rpc/LogWriter.py", line 39, in send_batch
    self.send_send_batch(batch)
  File "../gen-py/flaptor/indextank/rpc/LogWriter.py", line 46, in send_send_batch
    args.write(self._oprot)
  File "../gen-py/flaptor/indextank/rpc/LogWriter.py", line 139, in write
    self.batch.write(oprot)
  File "../gen-py/flaptor/indextank/rpc/ttypes.py", line 1679, in write
    iter138.write(oprot)
  File "../gen-py/flaptor/indextank/rpc/ttypes.py", line 1441, in write
    oprot.writeString(self.docid)
  File "../api/thrift/protocol/TBinaryProtocol.py", line 123, in writeString
    self.trans.write(str)
  File "../api/thrift/transport/TTransport.py", line 164, in write
    self.__wbuf.write(buf)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 0: ordinal not in range(128)

To reproduce, do this in python:

from indextank.client import ApiClient
c = ApiClient('<YOUR_API_URL>')  
idx = c.create_index('testascii')
idx.add_document("â", { "text":"a"}) 

I think it's ok to reject docids with non-latin1 or non-ascii characters, but I think it should return an HTTP 400 instead of 503 "service unavailable". (Or maybe docids are supposed to accept non-ascii characters?)

Also, this seems to be related but I'm not sure yet: when indexing in batches when this happened, it seemed to cause some problem with the LogWriter, with the following stack trace:

ERROR [pool-1-thread-32] org.apache.thrift.server.TThreadPoolServer - [Error occurred during processing of message.] 2012-02-04 10:27:15,724
java.lang.IllegalStateException: Can't insert records to the live log without defining the index code
        at com.google.common.base.Preconditions.checkState(Preconditions.java:145)
        at com.flaptor.indextank.storage.RawLog.write(RawLog.java:61)
        at com.flaptor.indextank.storage.LogWriterServer.send_batch(LogWriterServer.java:87)
        at com.flaptor.indextank.rpc.LogWriter$Processor$send_batch.process(LogWriter.java:214)
        at com.flaptor.indextank.rpc.LogWriter$Processor.process(LogWriter.java:193)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Finally, after this all happened, the LogWriter (slave) was taking all the CPU when no docs were being written, like it was in a spin loop. I did a kill -3 to get a thread stack dump, and one or two threads were RUNNABLE at this line:

at org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:129)
at org.apache.thrift.protocol.TProtocolUtil.skip(TProtocolUtil.java:60)
at com.flaptor.indextank.rpc.LogRecord.read(LogRecord.java:900)
...

I can create a separate issue for the LogWriter stuff if you want. But I'm not sure exactly what reproduces it yet.

Let me know if I can provide any more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.