Does anyone have any ideas on the issue noted below?

On Fri, Sep 28, 2012 at 11:00 AM, Steve <sjce...@gmail.com> wrote:

> Hello, I have a simple Solr core setup to index 500 store locations with
> their corresponding latitude / longitude.  The core is setup, running, and
> importing correctly however I'm seeing odd behavior when monitoring Sql.
>  Here are the steps I'm going through and the behavior we're seeing.
>
> We have a stored procedure, solr_GetStoreLocations that looks like this
>  (1) insert into SolrIndexLog (RecordCount, IndexName) select count(*),
> 'STORE_LOCATOR' from Stores;
>  (2) select * from Stores;
>
> The first step in the stored procedure inserts the record count from
> "Stores" into another table called "SolrIndexLog" so that we can run
> historical reports against what Solr indexed.  The second step returns all
> records from "Stores" to the DIH handler which imports the store records
> (correctly).
>
> The first step in the stored procedure does not seem to work.  When we use
> Sql Management Studio, connect to the Sql instance, and call
> "solr_GetStoreLocations" we see the insert statement execute and the record
> successfully inserted.  We ran a trace from Sql Management Studio and found
> that when Solr connects to Sql a "rollback tran" is being sent causing the
> "insert" to rollback.  Here are the details of the trace.
>
>  set transaction isolation level  read committed  set
> implicit_transactions off
>  set transaction isolation level  read committed  set
> implicit_transactions off
>  set implicit_transactions on
>  exec solr_GetStoreLocations
>  IF @@TRANCOUNT > 0 ROLLBACK TRAN
>  IF @@TRANCOUNT > 0 COMMIT TRAN set implicit_transactions off
>
> We are using Tomcat 7.0, Solr 3.5, and the sqljdbc4.jar driver.  We also
> have the Sql connection details setup through Tomcat's Catalina xml
> configuration as such (* replacing sensitive details).
>
>  <Context docBase="*\apache-solr-3_5_0.war" debug="0" crossContext="true" >
> <Environment name="solr/home" type="java.lang.String" value="*"
> override="true" />
>  <Resource name="jdbc/*" auth="Container"
> type="javax.sql.DataSource"
>  username="*"
> password="*"
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
>  url="jdbc:sqlserver://*;databaseName=*" />
>  </Context>
>
> For the life of me I cannot figure out what is causing the rollback and
> how to suppress the behavior.  Any help would be much appreciated.
>
> --
> Steve
> sjce...@gmail.com
>
>


-- 
Steve
sjce...@gmail.com

Reply via email to